[miner] allow bypassing TestBlockValidity

Allows us to test BlockAssembler on transactions without signatures or
mature coinbases (which is what PopulateMempool creates). Also means
that `TestBlockValidity()` is not included in the bench timing.
This commit is contained in:
glozow
2022-12-13 15:49:38 +00:00
parent c058852308
commit cba5934eb6
2 changed files with 9 additions and 2 deletions

View File

@@ -136,6 +136,9 @@ private:
unsigned int nBlockMaxWeight;
CFeeRate blockMinFeeRate;
// Whether to call TestBlockValidity() at the end of CreateNewBlock().
const bool test_block_validity;
// Information on the current status of the block
uint64_t nBlockWeight;
uint64_t nBlockTx;
@@ -156,6 +159,7 @@ public:
Options();
size_t nBlockMaxWeight;
CFeeRate blockMinFeeRate;
bool test_block_validity;
};
explicit BlockAssembler(Chainstate& chainstate, const CTxMemPool* mempool);