mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 06:28:31 +01:00
Get rid of the dummy CCoinsViewCache constructor arg
This commit is contained in:
@@ -116,7 +116,7 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
|
||||
{
|
||||
LOCK2(cs_main, mempool.cs);
|
||||
CBlockIndex* pindexPrev = chainActive.Tip();
|
||||
CCoinsViewCache view(*pcoinsTip, true);
|
||||
CCoinsViewCache view(pcoinsTip);
|
||||
|
||||
// Priority order to process transactions
|
||||
list<COrphan> vOrphan; // list memory doesn't move
|
||||
@@ -316,7 +316,7 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
|
||||
CBlockIndex indexDummy(*pblock);
|
||||
indexDummy.pprev = pindexPrev;
|
||||
indexDummy.nHeight = pindexPrev->nHeight + 1;
|
||||
CCoinsViewCache viewNew(*pcoinsTip, true);
|
||||
CCoinsViewCache viewNew(pcoinsTip);
|
||||
CValidationState state;
|
||||
if (!ConnectBlock(*pblock, state, &indexDummy, viewNew, true))
|
||||
throw std::runtime_error("CreateNewBlock() : ConnectBlock failed");
|
||||
|
||||
Reference in New Issue
Block a user