Skip to content

Commit

Permalink
Merge #639: Rename -con_connect_coinbase to -con_connect_genesis_outputs
Browse files Browse the repository at this point in the history
0a6f055 Rename -con_connect_coinbase to -con_connect_genesis_outputs (Steven Roose)

Pull request description:

  Closes #638

Tree-SHA512: 724425aa2706482cfb8c544f9f45e2d7d0f0dbd957c61e4b6829aabf965fc3bc61954d0b303db2e155f845d713512118a07c4250244174a1ae0328dba08b7d39
  • Loading branch information
instagibbs committed Jun 5, 2019
2 parents 66c0155 + 0a6f055 commit 4858d36
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/chainparams.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ class CCustomParams : public CRegTestParams {
consensus.mandatory_coinbase_destination = CScript(man_bytes.begin(), man_bytes.end()); // Blank script allows any coinbase destination

// Custom chains connect coinbase outputs to db by default
consensus.connect_genesis_outputs = args.GetArg("-con_connect_coinbase", true);
consensus.connect_genesis_outputs = args.GetArg("-con_connect_genesis_outputs", true);

initialFreeCoins = gArgs.GetArg("-initialfreecoins", 0);

Expand Down
2 changes: 1 addition & 1 deletion src/chainparamsbase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ void SetupChainParamsBaseOptions()
// ELEMENTS
gArgs.AddArg("-con_mandatorycoinbase", "All non-zero valued coinbase outputs must go to this scriptPubKey, if set.", false, OptionsCategory::ELEMENTS);
gArgs.AddArg("-con_blocksubsidy", "Defines the amount of block subsidy to start with, at genesis block, in satoshis.", false, OptionsCategory::ELEMENTS);
gArgs.AddArg("-con_connect_coinbase", "Connect outputs in genesis block to utxo database.", false, OptionsCategory::ELEMENTS);
gArgs.AddArg("-con_connect_genesis_outputs", "Connect outputs in genesis block to utxo database.", false, OptionsCategory::ELEMENTS);
gArgs.AddArg("-con_elementsmode", "Use Elements-like instead of Core-like witness encoding. This is required for CA/CT. (default: true)", false, OptionsCategory::ELEMENTS);
gArgs.AddArg("-con_blockheightinheader", "Whether the chain includes the block height directly in the header, for easier validation of block height in low-resource environments. (default: true)", false, OptionsCategory::CHAINPARAMS);
gArgs.AddArg("-con_genesis_style=<style>", "Use genesis style <style> (default: elements). Results in genesis block compatibility with various networks. Allowed values: elements, bitcoin", true, OptionsCategory::ELEMENTS);
Expand Down
2 changes: 1 addition & 1 deletion test/bitcoin_functional/functional/test_framework/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ def initialize_datadir(dirname, n):
f.write("printtoconsole=0\n")
# Elements:
f.write("con_blocksubsidy=5000000000\n")
f.write("con_connect_coinbase=0\n")
f.write("con_connect_genesis_outputs=0\n")
f.write("con_has_parent_chain=0\n")
f.write("parentgenesisblockhash=0\n")
f.write("anyonecanspendaremine=0\n")
Expand Down
2 changes: 1 addition & 1 deletion test/functional/feature_assetsdir.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class AssetdirTests(BitcoinTestFramework):
def set_test_params(self):
self.setup_clean_chain = True
self.num_nodes = 1
[["-initialfreecoins=2100000000000000", "-anyonecanspendaremine=1", "-con_connect_coinbase=1", "-con_blocksubsidy=0"]]
[["-initialfreecoins=2100000000000000", "-anyonecanspendaremine=1", "-con_connect_genesis_outputs=1", "-con_blocksubsidy=0"]]

def skip_test_if_missing_module(self):
self.skip_if_no_wallet()
Expand Down
2 changes: 1 addition & 1 deletion test/functional/feature_confidential_transactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class CTTest (BitcoinTestFramework):
def set_test_params(self):
self.num_nodes = 3
self.setup_clean_chain = True
args = ["-blindedaddresses=1", "-initialfreecoins=2100000000000000", "-con_blocksubsidy=0", "-con_connect_coinbase=1"]
args = ["-blindedaddresses=1", "-initialfreecoins=2100000000000000", "-con_blocksubsidy=0", "-con_connect_genesis_outputs=1"]
self.extra_args = [args] * self.num_nodes
self.extra_args[0].append("-anyonecanspendaremine=1") # first node gets the coins

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ def set_test_params(self):
self.num_nodes = 2
self.setup_clean_chain = True
# First node doesn't connect coinbase output to db, second does
self.extra_args = [["-con_connect_coinbase=0", "-initialfreecoins={}".format(NUM_INITIAL_COINS * COIN)],
["-con_connect_coinbase=1", "-initialfreecoins={}".format(NUM_INITIAL_COINS * COIN), '-anyonecanspendaremine=1']]
self.extra_args = [["-con_connect_genesis_outputs=0", "-initialfreecoins={}".format(NUM_INITIAL_COINS * COIN)],
["-con_connect_genesis_outputs=1", "-initialfreecoins={}".format(NUM_INITIAL_COINS * COIN), '-anyonecanspendaremine=1']]

def skip_test_if_missing_module(self):
self.skip_if_no_wallet()
Expand Down
2 changes: 1 addition & 1 deletion test/functional/feature_default_asset_name.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def set_test_params(self):
self.num_nodes = 2

#Set default asset name
self.extra_args = [["-defaultpeggedassetname=testasset", "-initialfreecoins=2100000000000000", "-anyonecanspendaremine=1", "-con_connect_coinbase=1", "-con_blocksubsidy=0"]]*2
self.extra_args = [["-defaultpeggedassetname=testasset", "-initialfreecoins=2100000000000000", "-anyonecanspendaremine=1", "-con_connect_genesis_outputs=1", "-con_blocksubsidy=0"]]*2

def setup_network(self, split=False):
self.setup_nodes()
Expand Down
2 changes: 1 addition & 1 deletion test/functional/feature_initial_reissuance_token.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def set_test_params(self):
self.num_nodes = 2

#Set number of initial reissuance tokens and also set initial free coins less than max so we can reissue more later
self.extra_args = [["-initialreissuancetokens=200000000", "-initialfreecoins=2000000000000000", "-anyonecanspendaremine=1", "-con_connect_coinbase=1", "-con_blocksubsidy=0", "-blindedaddresses=1"]]*2
self.extra_args = [["-initialreissuancetokens=200000000", "-initialfreecoins=2000000000000000", "-anyonecanspendaremine=1", "-con_connect_genesis_outputs=1", "-con_blocksubsidy=0", "-blindedaddresses=1"]]*2

def skip_test_if_missing_module(self):
self.skip_if_no_wallet()
Expand Down
2 changes: 1 addition & 1 deletion test/functional/test_framework/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ def initialize_datadir(dirname, n, chain):
f.write("validatepegin=0\n")
f.write("con_parent_pegged_asset=" + BITCOIN_ASSET + "\n")
f.write("con_blocksubsidy=5000000000\n")
f.write("con_connect_coinbase=0\n")
f.write("con_connect_genesis_outputs=0\n")
f.write("anyonecanspendaremine=0\n")
f.write("walletrbf=0\n") # Default is 1 in Elements
f.write("con_bip34height=500\n")
Expand Down
2 changes: 1 addition & 1 deletion test/functional/test_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
'feature_fedpeg.py',
'feature_mandatory_coinbase.py',
'feature_block_subsidy.py',
'feature_connect_coinbase.py',
'feature_connect_genesis_outputs.py',
'feature_block_v4.py',
'feature_pak.py',
'feature_blocksign.py',
Expand Down

0 comments on commit 4858d36

Please sign in to comment.