mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-16 13:01:19 +02:00
Merge fc06881f13 into merged_master (Bitcoin PR bitcoin/bitcoin#27491)
This commit is contained in:
commit
cbd7b123d9
93 changed files with 546 additions and 303 deletions
|
|
@ -46,6 +46,7 @@
|
|||
#include <timedata.h>
|
||||
#include <txdb.h>
|
||||
#include <txmempool.h>
|
||||
#include <util/chaintype.h>
|
||||
#include <util/strencodings.h>
|
||||
#include <util/string.h>
|
||||
#include <util/system.h>
|
||||
|
|
@ -102,7 +103,7 @@ std::ostream& operator<<(std::ostream& os, const uint256& num)
|
|||
return os;
|
||||
}
|
||||
|
||||
BasicTestingSetup::BasicTestingSetup(const std::string& chainName, const std::vector<const char*>& extra_args, const std::string& fedpegscript)
|
||||
BasicTestingSetup::BasicTestingSetup(const ChainType chainType, const std::vector<const char*>& extra_args, const std::string& fedpegscript)
|
||||
: m_path_root{fs::temp_directory_path() / "test_common_" PACKAGE_NAME / g_insecure_rand_ctx_temp_path.rand256().ToString()},
|
||||
m_args{}
|
||||
{
|
||||
|
|
@ -143,7 +144,7 @@ BasicTestingSetup::BasicTestingSetup(const std::string& chainName, const std::ve
|
|||
throw std::runtime_error{error};
|
||||
}
|
||||
}
|
||||
SelectParams(chainName);
|
||||
SelectParams(chainType);
|
||||
SeedInsecureRand();
|
||||
if (G_TEST_LOG_FUN) LogInstance().PushBackCallback(G_TEST_LOG_FUN);
|
||||
InitLogging(*m_node.args);
|
||||
|
|
@ -184,8 +185,8 @@ BasicTestingSetup::~BasicTestingSetup()
|
|||
gArgs.ClearArgs();
|
||||
}
|
||||
|
||||
ChainTestingSetup::ChainTestingSetup(const std::string& chainName, const std::vector<const char*>& extra_args, const std::string& fedpegscript)
|
||||
: BasicTestingSetup(chainName, extra_args, fedpegscript)
|
||||
ChainTestingSetup::ChainTestingSetup(const ChainType chainType, const std::vector<const char*>& extra_args, const std::string& fedpegscript)
|
||||
: BasicTestingSetup(chainType, extra_args, fedpegscript)
|
||||
{
|
||||
const CChainParams& chainparams = Params();
|
||||
|
||||
|
|
@ -263,12 +264,12 @@ void ChainTestingSetup::LoadVerifyActivateChainstate()
|
|||
}
|
||||
|
||||
TestingSetup::TestingSetup(
|
||||
const std::string& chainName,
|
||||
const ChainType chainType,
|
||||
const std::vector<const char*>& extra_args,
|
||||
const std::string& fedpegscript,
|
||||
const bool coins_db_in_memory,
|
||||
const bool block_tree_db_in_memory)
|
||||
: ChainTestingSetup(chainName, extra_args, fedpegscript)
|
||||
: ChainTestingSetup(chainType, extra_args, fedpegscript)
|
||||
{
|
||||
m_coins_db_in_memory = coins_db_in_memory;
|
||||
m_block_tree_db_in_memory = block_tree_db_in_memory;
|
||||
|
|
@ -295,12 +296,12 @@ TestingSetup::TestingSetup(
|
|||
}
|
||||
|
||||
TestChain100Setup::TestChain100Setup(
|
||||
const std::string& chain_name,
|
||||
const ChainType chain_type,
|
||||
const std::vector<const char*>& extra_args,
|
||||
const std::string& fedpegscript,
|
||||
const bool coins_db_in_memory,
|
||||
const bool block_tree_db_in_memory)
|
||||
: TestingSetup{CBaseChainParams::REGTEST, extra_args, fedpegscript, coins_db_in_memory, block_tree_db_in_memory}
|
||||
: TestingSetup{ChainType::REGTEST, extra_args, fedpegscript, coins_db_in_memory, block_tree_db_in_memory}
|
||||
{
|
||||
SetMockTime(1598887952);
|
||||
constexpr std::array<unsigned char, 32> vchKey = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue