forked from cerc-io/plugeth
Modified test plugin to enable faster execution.
This required adding a dummy injection into core/blockchain.go
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user