From 04d06917d28968e32dd8292da9ea52398c57d9e5 Mon Sep 17 00:00:00 2001 From: Steven Roose Date: Wed, 20 Mar 2019 11:50:26 +0000 Subject: [PATCH] Rename con_elementswitness to con_elementsmode It will have effect on more than just witness structure from now on. --- src/chainparams.cpp | 14 +++++++------- src/chainparamsbase.cpp | 2 +- src/consensus/merkle.cpp | 2 +- src/consensus/validation.h | 2 +- src/core_write.cpp | 2 +- src/init.cpp | 2 +- src/primitives/confidential.h | 6 +++--- src/primitives/transaction.cpp | 4 ++-- src/primitives/transaction.h | 6 +++--- src/wallet/rpcwallet.cpp | 4 ++-- .../functional/test_framework/util.py | 2 +- 11 files changed, 23 insertions(+), 23 deletions(-) diff --git a/src/chainparams.cpp b/src/chainparams.cpp index f73fe299b8..4f666c7916 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -151,7 +151,7 @@ public: multi_data_permitted = false; consensus.has_parent_chain = false; g_signed_blocks = false; - g_con_elementswitness = false; + g_con_elementsmode = false; g_con_blockheightinheader = false; /** @@ -277,7 +277,7 @@ public: multi_data_permitted = false; consensus.has_parent_chain = false; g_signed_blocks = false; - g_con_elementswitness = false; + g_con_elementsmode = false; g_con_blockheightinheader = false; pchMessageStart[0] = 0x0b; @@ -378,7 +378,7 @@ public: multi_data_permitted = false; consensus.has_parent_chain = false; g_signed_blocks = false; - g_con_elementswitness = false; + g_con_elementsmode = false; g_con_blockheightinheader = false; pchMessageStart[0] = 0xfa; @@ -543,7 +543,7 @@ class CCustomParams : public CRegTestParams { // Note: These globals are needed to avoid circular dependencies. // Default to true for custom chains. g_con_blockheightinheader = args.GetBoolArg("-con_blockheightinheader", true); - g_con_elementswitness = args.GetBoolArg("-con_elementswitness", true); + g_con_elementsmode = args.GetBoolArg("-con_elementsmode", true); // No subsidy for custom chains by default consensus.genesis_subsidy = args.GetArg("-con_blocksubsidy", 0); @@ -591,7 +591,7 @@ class CCustomParams : public CRegTestParams { GenerateAssetEntropy(entropy, COutPoint(uint256(commit), 0), parentGenesisBlockHash); // Elements serialization uses derivation, bitcoin serialization uses 0x00 - if (g_con_elementswitness) { + if (g_con_elementsmode) { CalculateAsset(consensus.pegged_asset, entropy); } else { assert(consensus.pegged_asset == CAsset()); @@ -712,7 +712,7 @@ public: g_signed_blocks = true; g_con_blockheightinheader = true; - g_con_elementswitness = true; + g_con_elementsmode = true; consensus.genesis_subsidy = 0; @@ -750,7 +750,7 @@ public: GenerateAssetEntropy(entropy, COutPoint(uint256(commit), 0), parentGenesisBlockHash); // Elements serialization uses derivation, bitcoin serialization uses 0x00 - if (g_con_elementswitness) { + if (g_con_elementsmode) { CalculateAsset(consensus.pegged_asset, entropy); } else { assert(consensus.pegged_asset == CAsset()); diff --git a/src/chainparamsbase.cpp b/src/chainparamsbase.cpp index 26510ea95f..bbaf9bdb9b 100644 --- a/src/chainparamsbase.cpp +++ b/src/chainparamsbase.cpp @@ -27,7 +27,7 @@ void SetupChainParamsBaseOptions() 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.", false, OptionsCategory::ELEMENTS); gArgs.AddArg("-con_connect_coinbase", "Connect outputs in genesis block to utxo database.", false, OptionsCategory::ELEMENTS); - gArgs.AddArg("-con_elementswitness", "Use Elements-like instead of Core-like witness encoding. This is required for CA/CT. (default: true)", 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=