Skip to content

Commit

Permalink
Mining: to use correct ibs snapshot (#1601)
Browse files Browse the repository at this point in the history
  • Loading branch information
AskAlexSharov committed Apr 6, 2021
1 parent 95fd74e commit 302ad16
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions eth/stagedsync/stage_mining_exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,10 @@ func addTransactionsToMiningBlock(current *miningBlock, chainConfig *params.Chai
noop := state.NewNoopWriter()

var miningCommitTx = func(txn *types.Transaction, coinbase common.Address, vmConfig *vm.Config, chainConfig *params.ChainConfig, cc *core.TinyChainContext, ibs *state.IntraBlockState, current *miningBlock) ([]*types.Log, error) {
snap := ibs.Snapshot()
receipt, err := core.ApplyTransaction(chainConfig, cc, &coinbase, gasPool, ibs, noop, header, txn, &header.GasUsed, *vmConfig)
if err != nil {
ibs.RevertToSnapshot(snap)
return nil, err
}
//if !chainConfig.IsByzantium(header.Number) {
Expand Down

0 comments on commit 302ad16

Please sign in to comment.