Modified test plugin to enable faster execution.

This required adding a dummy injection into core/blockchain.go
This commit is contained in:
philip-morlier
2023-09-28 09:30:31 -07:00
parent 18be67b3a3
commit 9d34721d46
3 changed files with 7 additions and 4 deletions
+5
View File
@@ -1386,6 +1386,11 @@ func (bc *BlockChain) writeKnownBlock(block *types.Block) error {
// writeBlockWithState writes block, metadata and corresponding state data to the
// database.
func (bc *BlockChain) writeBlockWithState(block *types.Block, receipts []*types.Receipt, state *state.StateDB) error {
//begin PluGeth injection
var interval time.Duration
_ = pluginSetTrieFlushIntervalClone(interval) // this is being called here to engage a testing scenario
//end PluGeth injection
// Calculate the total difficulty of the block
ptd := bc.GetTd(block.ParentHash(), block.NumberU64()-1)
if ptd == nil {