Skip to content

Commit 2f247a3

Browse files
Merge branch 'master' into remove-advancestateuptoblock-func
2 parents fece13e + 54adef6 commit 2f247a3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

core/state_processor.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ func (p *StateProcessor) Process(block *types.Block, statedb *state.StateDB, cfg
8080
}
8181
// Iterate over and process the individual transactions
8282
for i, tx := range block.Transactions() {
83-
msg, err := TransactionToMessage(tx, signer, header.BaseFee, MessageCommitMode)
83+
msg, err := TransactionToMessage(tx, signer, header.BaseFee, MessageReplayMode)
8484
if err != nil {
8585
return nil, nil, 0, fmt.Errorf("could not apply tx %d [%v]: %w", i, tx.Hash().Hex(), err)
8686
}
@@ -166,11 +166,11 @@ func applyTransaction(msg *Message, config *params.ChainConfig, gp *GasPool, sta
166166
// for the transaction, gas used and an error if the transaction failed,
167167
// indicating the block was invalid.
168168
func ApplyTransaction(config *params.ChainConfig, bc ChainContext, author *common.Address, gp *GasPool, statedb *state.StateDB, header *types.Header, tx *types.Transaction, usedGas *uint64, cfg vm.Config) (*types.Receipt, *ExecutionResult, error) {
169-
return ApplyTransactionWithResultFilter(config, bc, author, gp, statedb, header, tx, usedGas, cfg, nil)
169+
return ApplyTransactionWithResultFilter(config, bc, author, gp, statedb, header, tx, usedGas, cfg, MessageReplayMode, nil)
170170
}
171171

172-
func ApplyTransactionWithResultFilter(config *params.ChainConfig, bc ChainContext, author *common.Address, gp *GasPool, statedb *state.StateDB, header *types.Header, tx *types.Transaction, usedGas *uint64, cfg vm.Config, resultFilter func(*ExecutionResult) error) (*types.Receipt, *ExecutionResult, error) {
173-
msg, err := TransactionToMessage(tx, types.MakeSigner(config, header.Number, header.Time), header.BaseFee, MessageReplayMode)
172+
func ApplyTransactionWithResultFilter(config *params.ChainConfig, bc ChainContext, author *common.Address, gp *GasPool, statedb *state.StateDB, header *types.Header, tx *types.Transaction, usedGas *uint64, cfg vm.Config, runMode MessageRunMode, resultFilter func(*ExecutionResult) error) (*types.Receipt, *ExecutionResult, error) {
173+
msg, err := TransactionToMessage(tx, types.MakeSigner(config, header.Number, header.Time), header.BaseFee, runMode)
174174
if err != nil {
175175
return nil, nil, err
176176
}

0 commit comments

Comments
 (0)