diff --git a/src/policy/policy.h b/src/policy/policy.h index b01db3c271..8f8012f0ce 100644 --- a/src/policy/policy.h +++ b/src/policy/policy.h @@ -22,7 +22,7 @@ extern CAsset policyAsset; /** Default for -blockmaxweight, which controls the range of block weights the mining code will create **/ static const unsigned int DEFAULT_BLOCK_MAX_WEIGHT = MAX_BLOCK_WEIGHT - 4000; /** Default for -blockmintxfee, which sets the minimum feerate for a transaction in blocks created by mining code **/ -static const unsigned int DEFAULT_BLOCK_MIN_TX_FEE = 1000; +static const unsigned int DEFAULT_BLOCK_MIN_TX_FEE = 100; /** The maximum weight for transactions we're willing to relay/mine */ static const unsigned int MAX_STANDARD_TX_WEIGHT = 400000; /** 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; /** Default for -maxmempool, maximum megabytes of mempool memory usage */ static const unsigned int DEFAULT_MAX_MEMPOOL_SIZE = 300; /** Default for -incrementalrelayfee, which sets the minimum feerate increase for mempool limiting or BIP 125 replacement **/ -static const unsigned int DEFAULT_INCREMENTAL_RELAY_FEE = 1000; +static const unsigned int DEFAULT_INCREMENTAL_RELAY_FEE = 100; /** Default for -bytespersigop */ static const unsigned int DEFAULT_BYTES_PER_SIGOP = 20; /** The maximum number of witness stack items in a standard P2WSH script */ diff --git a/src/test/test_bitcoin.cpp b/src/test/test_bitcoin.cpp index 29ff631d8d..abb954d7f7 100644 --- a/src/test/test_bitcoin.cpp +++ b/src/test/test_bitcoin.cpp @@ -60,6 +60,9 @@ BasicTestingSetup::BasicTestingSetup(const std::string& chainName, const std::st // Set policy asset for correct fee output generation policyAsset = CAsset(); + // For unit tests, increase minrelay to "normal" 1000 sat/vkB + incrementalRelayFee = CFeeRate(1000); + noui_connect(); } diff --git a/src/validation.h b/src/validation.h index 553b2a449a..1fae307d6b 100644 --- a/src/validation.h +++ b/src/validation.h @@ -55,7 +55,7 @@ static const bool DEFAULT_WHITELISTRELAY = true; /** Default for -whitelistforcerelay. */ static const bool DEFAULT_WHITELISTFORCERELAY = false; /** Default for -minrelaytxfee, minimum relay fee for transactions */ -static const unsigned int DEFAULT_MIN_RELAY_TX_FEE = 1000; +static const unsigned int DEFAULT_MIN_RELAY_TX_FEE = 100; //! -maxtxfee default static const CAmount DEFAULT_TRANSACTION_MAXFEE = COIN / 10; //! Discourage users to set fees higher than this amount (in satoshis) per kB diff --git a/test/bitcoin_functional/functional/test_framework/util.py b/test/bitcoin_functional/functional/test_framework/util.py index 52b29b4c26..d07123b5d0 100644 --- a/test/bitcoin_functional/functional/test_framework/util.py +++ b/test/bitcoin_functional/functional/test_framework/util.py @@ -323,6 +323,7 @@ def initialize_datadir(dirname, n): f.write("scriptprefix=196\n") f.write("bech32_hrp=bcrt\n") f.write("con_dyna_deploy_start="+str(2**31)+"\n") # Never starts + f.write("minrelaytxfee=0.00001\n") os.makedirs(os.path.join(datadir, 'stderr'), exist_ok=True) os.makedirs(os.path.join(datadir, 'stdout'), exist_ok=True) return datadir diff --git a/test/functional/test_framework/util.py b/test/functional/test_framework/util.py index 64df8587f3..4200a87407 100644 --- a/test/functional/test_framework/util.py +++ b/test/functional/test_framework/util.py @@ -331,6 +331,7 @@ def initialize_datadir(dirname, n, chain): f.write("con_csv_deploy_start=0\n") # Enhance tests if removing this line f.write("blindedaddresses=0\n") # Set to minimize broken tests in favor of custom f.write("con_dyna_deploy_start="+str(2**31)+"\n") # Never starts unless overridden + f.write("minrelaytxfee=0.00001\n") #f.write("pubkeyprefix=111\n") #f.write("scriptprefix=196\n") #f.write("bech32_hrp=bcrt\n")