Skip to content

Commit

Permalink
Reduce min relay to 100 sat/vkB
Browse files Browse the repository at this point in the history
  • Loading branch information
instagibbs committed Oct 8, 2019
1 parent ab0b7ac commit 191f7b9
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/policy/policy.h
Original file line number Diff line number Diff line change
Expand Up @@ -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) */
Expand All @@ -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 */
Expand Down
3 changes: 3 additions & 0 deletions src/test/test_bitcoin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down
2 changes: 1 addition & 1 deletion src/validation.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions test/bitcoin_functional/functional/test_framework/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions test/functional/test_framework/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 191f7b9

Please sign in to comment.