Refactor CreateNewBlock to be a method of the BlockAssembler class

This commit is contained in:
Alex Morcos
2015-12-15 15:26:44 -05:00
parent 239d419864
commit 4dc94d1036
5 changed files with 328 additions and 206 deletions

View File

@@ -98,7 +98,7 @@ CBlock
TestChain100Setup::CreateAndProcessBlock(const std::vector<CMutableTransaction>& txns, const CScript& scriptPubKey)
{
const CChainParams& chainparams = Params();
CBlockTemplate *pblocktemplate = CreateNewBlock(chainparams, scriptPubKey);
CBlockTemplate *pblocktemplate = BlockAssembler(chainparams).CreateNewBlock(scriptPubKey);
CBlock& block = pblocktemplate->block;
// Replace mempool-selected txns with just coinbase plus passed-in txns: