Changeset View
Changeset View
Standalone View
Standalone View
src/test/util/setup_common.cpp
Show First 20 Lines • Show All 246 Lines • ▼ Show 20 Lines | CBlock TestChain100Setup::CreateAndProcessBlock( | ||||
const Consensus::Params ¶ms = config.GetChainParams().GetConsensus(); | const Consensus::Params ¶ms = config.GetChainParams().GetConsensus(); | ||||
while (!CheckProofOfWork(block.GetHash(), block.nBits, params)) { | while (!CheckProofOfWork(block.GetHash(), block.nBits, params)) { | ||||
++block.nNonce; | ++block.nNonce; | ||||
} | } | ||||
std::shared_ptr<const CBlock> shared_pblock = | std::shared_ptr<const CBlock> shared_pblock = | ||||
std::make_shared<const CBlock>(block); | std::make_shared<const CBlock>(block); | ||||
EnsureChainman(m_node).ProcessNewBlock(config, shared_pblock, true, | Assert(m_node.chainman) | ||||
nullptr); | ->ProcessNewBlock(config, shared_pblock, true, nullptr); | ||||
CBlock result = block; | CBlock result = block; | ||||
return result; | return result; | ||||
} | } | ||||
TestChain100Setup::~TestChain100Setup() {} | TestChain100Setup::~TestChain100Setup() {} | ||||
CTxMemPoolEntry TestMemPoolEntryHelper::FromTx(const CMutableTransaction &tx) { | CTxMemPoolEntry TestMemPoolEntryHelper::FromTx(const CMutableTransaction &tx) { | ||||
▲ Show 20 Lines • Show All 114 Lines • Show Last 20 Lines |