diff --git a/action/protocol/execution/evm/evm.go b/action/protocol/execution/evm/evm.go index 80fce16646..74482f401f 100644 --- a/action/protocol/execution/evm/evm.go +++ b/action/protocol/execution/evm/evm.go @@ -399,9 +399,6 @@ func prepareStateDB(ctx context.Context, sm protocol.StateManager) (*StateDBAdap if featureCtx.RevertLog { opts = append(opts, RevertLogOption()) } - if !featureCtx.FixUnproductiveDelegates { - opts = append(opts, NotCheckPutStateErrorOption()) - } if !featureCtx.CorrectGasRefund { opts = append(opts, ManualCorrectGasRefundOption()) } diff --git a/action/protocol/execution/evm/evmstatedbadapter.go b/action/protocol/execution/evm/evmstatedbadapter.go index 50ad930175..46dff0dbab 100644 --- a/action/protocol/execution/evm/evmstatedbadapter.go +++ b/action/protocol/execution/evm/evmstatedbadapter.go @@ -67,7 +67,6 @@ type ( legacyNonceAccount bool fixSnapshotOrder bool revertLog bool - notCheckPutStateError bool manualCorrectGasRefund bool } ) @@ -131,14 +130,6 @@ func RevertLogOption() StateDBAdapterOption { } } -// NotCheckPutStateErrorOption set notCheckPutStateError as true -func NotCheckPutStateErrorOption() StateDBAdapterOption { - return func(adapter *StateDBAdapter) error { - adapter.notCheckPutStateError = true - return nil - } -} - // ManualCorrectGasRefundOption set manualCorrectGasRefund as true func ManualCorrectGasRefundOption() StateDBAdapterOption { return func(adapter *StateDBAdapter) error { @@ -990,8 +981,7 @@ func (stateDB *StateDBAdapter) CommitContracts() error { v := stateDB.preimages[k] h := make([]byte, len(k)) copy(h, k[:]) - _, err = stateDB.sm.PutState(v, protocol.NamespaceOption(PreimageKVNameSpace), protocol.KeyOption(h)) - if !stateDB.notCheckPutStateError && err != nil { + if _, err = stateDB.sm.PutState(v, protocol.NamespaceOption(PreimageKVNameSpace), protocol.KeyOption(h)); err != nil { stateDB.logError(err) return errors.Wrap(err, "failed to update preimage to db") }