test: elements fixes for Bitcoin PR bitcoin/bitcoin#22818

This commit is contained in:
Byron Hambly 2023-04-24 08:30:36 +00:00
parent 13fb374543
commit 7856df2733
7 changed files with 10 additions and 5 deletions

View file

@ -769,7 +769,7 @@ protected:
consensus.BIP34Hash = uint256S(args.GetArg("-con_bip34hash", "0x0"));
consensus.BIP65Height = args.GetArg("-con_bip65height", 0);
consensus.BIP66Height = args.GetArg("-con_bip66height", 0);
consensus.CSVHeight = args.GetArg("-con_csv_deploy_start", 432);
consensus.CSVHeight = args.GetArg("-con_csv_deploy_start", 1);
consensus.powLimit = uint256S(args.GetArg("-con_powlimit", "7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"));
consensus.nPowTargetTimespan = args.GetArg("-con_npowtargettimespan", consensus.nPowTargetTimespan);
consensus.nPowTargetSpacing = args.GetArg("-con_npowtargetspacing", consensus.nPowTargetSpacing);

View file

@ -231,7 +231,7 @@ TestingSetup::TestingSetup(const std::string& chainName, const std::string& fedp
}
TestChain100Setup::TestChain100Setup(const std::vector<const char*>& extra_args)
: TestingSetup{CBaseChainParams::REGTEST, extra_args}
: TestingSetup{CBaseChainParams::REGTEST, "", extra_args} // ELEMENTS: added empty fedpegscript here
{
SetMockTime(1598887952);
constexpr std::array<unsigned char, 32> vchKey = {

View file

@ -45,10 +45,12 @@ class BIP68Test(BitcoinTestFramework):
[
'-testactivationheight=csv@432',
"-acceptnonstdtxn=1",
"-con_csv_deploy_start=432", # ELEMENTS
],
[
'-testactivationheight=csv@432',
"-acceptnonstdtxn=0",
"-con_csv_deploy_start=432", # ELEMENTS
],
]

View file

@ -85,6 +85,7 @@ class FullBlockTest(BitcoinTestFramework):
self.extra_args = [[
'-acceptnonstdtxn=1', # This is a consensus block test, we don't care about tx policy
'-testactivationheight=bip34@2',
"-con_bip34height=2", # ELEMENTS
]]
def run_test(self):

View file

@ -86,6 +86,7 @@ class BIP65Test(BitcoinTestFramework):
'-whitelist=noban@127.0.0.1',
'-par=1', # Use only one script thread to get the exact reject reason for testing
'-acceptnonstdtxn=1', # cltv_invalidate is nonstandard
f'-con_bip65height={CLTV_HEIGHT}', # ELEMENTS
]]
self.setup_clean_chain = True
self.rpc_timeout = 480

View file

@ -51,6 +51,7 @@ class BIP66Test(BitcoinTestFramework):
f'-testactivationheight=dersig@{DERSIG_HEIGHT}',
'-whitelist=noban@127.0.0.1',
'-par=1', # Use only one script thread to get the exact log msg for testing
f'-con_bip66height={DERSIG_HEIGHT}', # ELEMENTS
]]
self.setup_clean_chain = True
self.rpc_timeout = 240

View file

@ -396,9 +396,9 @@ def write_config(config_path, *, n, chain, extra_config="", disable_autoconnect=
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=2\n")
f.write("con_bip65height=111\n")
f.write("con_bip66height=102\n")
f.write("con_bip34height=1\n")
f.write("con_bip65height=1\n")
f.write("con_bip66height=1\n")
f.write("blindedaddresses=0\n") # Set to minimize broken tests in favor of custom
f.write("evbparams=dynafed:"+str(2**31)+":::\n") # Never starts unless overridden
f.write("minrelaytxfee=0.00001\n")