diff options
author | Carl Dong <contact@carldong.me> | 2020-09-30 17:02:51 -0400 |
---|---|---|
committer | Carl Dong <contact@carldong.me> | 2021-01-28 14:15:26 -0500 |
commit | 9c300cc8b3ce3d82874982fbf3087e48a6ac0ef2 (patch) | |
tree | c97b5a6ae6098a87906879fcf2d19224a1a9c1a4 /src/miner.cpp | |
parent | 0e17c833cda67cdba5338bd7409061772b6d5edb (diff) |
validation: Pass in chainstate to TestBlockValidity
[META] This commit should be followed up by removing the comments and
assertions meant only to show that the change is correct.
Diffstat (limited to 'src/miner.cpp')
-rw-r--r-- | src/miner.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/miner.cpp b/src/miner.cpp index 8f7bc66908..076d43c951 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -176,7 +176,7 @@ std::unique_ptr<CBlockTemplate> BlockAssembler::CreateNewBlock(const CScript& sc pblocktemplate->vTxSigOpsCost[0] = WITNESS_SCALE_FACTOR * GetLegacySigOpCount(*pblock->vtx[0]); BlockValidationState state; - if (!TestBlockValidity(state, chainparams, *pblock, pindexPrev, false, false)) { + if (!TestBlockValidity(state, chainparams, ::ChainstateActive(), *pblock, pindexPrev, false, false)) { throw std::runtime_error(strprintf("%s: TestBlockValidity failed: %s", __func__, state.ToString())); } int64_t nTime2 = GetTimeMicros(); |