Skip to content

Commit

Permalink
Merge d6f304a into merged_master (Elements PR ElementsProject#684)
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
apoelstra committed Nov 9, 2020
2 parents fc7646d + d6f304a commit cfef1b1
Show file tree
Hide file tree
Showing 5 changed files with 11 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;
/** Default for -permitbaremultisig */
Expand Down
6 changes: 6 additions & 0 deletions src/test/setup_common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include <noui.h>
#include <pow.h>
#include <policy/policy.h>
#include <policy/settings.h>
#include <streams.h>
#include <rpc/server.h>
#include <rpc/register.h>
Expand Down Expand Up @@ -73,11 +74,16 @@ 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);

static bool noui_connected = false;
if (!noui_connected) {
noui_connect();
noui_connected = true;
}

noui_connect();
}

BasicTestingSetup::~BasicTestingSetup()
Expand Down
2 changes: 1 addition & 1 deletion src/validation.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ struct PrecomputedTransactionData;
struct LockPoints;

/** 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;
/** Default for -limitancestorcount, max number of in-mempool ancestors */
static const unsigned int DEFAULT_ANCESTOR_LIMIT = 25;
/** Default for -limitancestorsize, maximum kilobytes of tx + all in-mempool ancestors */
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 @@ -336,6 +336,7 @@ def initialize_datadir(dirname, n, chain):
f.write("con_bip66height=1251\n")
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 cfef1b1

Please sign in to comment.