Skip to content

Commit 6823c31

Browse files
committed
Merge d6f304a into merged_master (Elements PR #684)
This PR reduced the minrelayfee for Elements, but also brought in some changes from upstream which I mostly just didn't take (since we've already brought them in, in earlier parts of this rebase).
2 parents 47ac162 + d6f304a commit 6823c31

File tree

5 files changed

+11
-3
lines changed

5 files changed

+11
-3
lines changed

src/policy/policy.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ extern CAsset policyAsset;
2222
/** Default for -blockmaxweight, which controls the range of block weights the mining code will create **/
2323
static const unsigned int DEFAULT_BLOCK_MAX_WEIGHT = MAX_BLOCK_WEIGHT - 4000;
2424
/** Default for -blockmintxfee, which sets the minimum feerate for a transaction in blocks created by mining code **/
25-
static const unsigned int DEFAULT_BLOCK_MIN_TX_FEE = 1000;
25+
static const unsigned int DEFAULT_BLOCK_MIN_TX_FEE = 100;
2626
/** The maximum weight for transactions we're willing to relay/mine */
2727
static const unsigned int MAX_STANDARD_TX_WEIGHT = 400000;
2828
/** The minimum non-witness size for transactions we're willing to relay/mine (1 segwit input + 1 P2WPKH output = 82 bytes) */
@@ -34,7 +34,7 @@ static const unsigned int MAX_STANDARD_TX_SIGOPS_COST = MAX_BLOCK_SIGOPS_COST/5;
3434
/** Default for -maxmempool, maximum megabytes of mempool memory usage */
3535
static const unsigned int DEFAULT_MAX_MEMPOOL_SIZE = 300;
3636
/** Default for -incrementalrelayfee, which sets the minimum feerate increase for mempool limiting or BIP 125 replacement **/
37-
static const unsigned int DEFAULT_INCREMENTAL_RELAY_FEE = 1000;
37+
static const unsigned int DEFAULT_INCREMENTAL_RELAY_FEE = 100;
3838
/** Default for -bytespersigop */
3939
static const unsigned int DEFAULT_BYTES_PER_SIGOP = 20;
4040
/** Default for -permitbaremultisig */

src/test/setup_common.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#include <noui.h>
1818
#include <pow.h>
1919
#include <policy/policy.h>
20+
#include <policy/settings.h>
2021
#include <streams.h>
2122
#include <rpc/server.h>
2223
#include <rpc/register.h>
@@ -73,11 +74,16 @@ BasicTestingSetup::BasicTestingSetup(const std::string& chainName, const std::st
7374
// Set policy asset for correct fee output generation
7475
policyAsset = CAsset();
7576

77+
// For unit tests, increase minrelay to "normal" 1000 sat/vkB
78+
::incrementalRelayFee = CFeeRate(1000);
79+
7680
static bool noui_connected = false;
7781
if (!noui_connected) {
7882
noui_connect();
7983
noui_connected = true;
8084
}
85+
86+
noui_connect();
8187
}
8288

8389
BasicTestingSetup::~BasicTestingSetup()

src/validation.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ struct PrecomputedTransactionData;
5656
struct LockPoints;
5757

5858
/** Default for -minrelaytxfee, minimum relay fee for transactions */
59-
static const unsigned int DEFAULT_MIN_RELAY_TX_FEE = 1000;
59+
static const unsigned int DEFAULT_MIN_RELAY_TX_FEE = 100;
6060
/** Default for -limitancestorcount, max number of in-mempool ancestors */
6161
static const unsigned int DEFAULT_ANCESTOR_LIMIT = 25;
6262
/** Default for -limitancestorsize, maximum kilobytes of tx + all in-mempool ancestors */

test/bitcoin_functional/functional/test_framework/util.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,7 @@ def initialize_datadir(dirname, n):
323323
f.write("scriptprefix=196\n")
324324
f.write("bech32_hrp=bcrt\n")
325325
f.write("con_dyna_deploy_start="+str(2**31)+"\n") # Never starts
326+
f.write("minrelaytxfee=0.00001\n")
326327
os.makedirs(os.path.join(datadir, 'stderr'), exist_ok=True)
327328
os.makedirs(os.path.join(datadir, 'stdout'), exist_ok=True)
328329
return datadir

test/functional/test_framework/util.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,7 @@ def initialize_datadir(dirname, n, chain):
336336
f.write("con_bip66height=1251\n")
337337
f.write("blindedaddresses=0\n") # Set to minimize broken tests in favor of custom
338338
f.write("con_dyna_deploy_start="+str(2**31)+"\n") # Never starts unless overridden
339+
f.write("minrelaytxfee=0.00001\n")
339340
#f.write("pubkeyprefix=111\n")
340341
#f.write("scriptprefix=196\n")
341342
#f.write("bech32_hrp=bcrt\n")

0 commit comments

Comments
 (0)