mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 18:32:23 +00:00
rm ecrecover override field
This commit is contained in:
parent
5d351c9f33
commit
63f4f6e5a8
2 changed files with 3 additions and 12 deletions
|
|
@ -26,7 +26,6 @@ import (
|
|||
// Config are the configuration options for the Interpreter
|
||||
type Config struct {
|
||||
Tracer EVMLogger // Opcode logger
|
||||
DisableECRecover bool // Debug flag to remove ecrecover from precompiles. Used for call simulations.
|
||||
NoBaseFee bool // Forces the EIP-1559 baseFee to 0 (needed for 0 price calls)
|
||||
EnablePreimageRecording bool // Enables recording of SHA3/keccak preimages
|
||||
ExtraEips []int // Additional EIPS that are to be enabled
|
||||
|
|
|
|||
|
|
@ -1182,7 +1182,6 @@ func (s *BlockChainAPI) Call(ctx context.Context, args TransactionArgs, blockNrO
|
|||
type CallBatch struct {
|
||||
BlockOverrides *BlockOverrides
|
||||
StateOverrides *StateOverride
|
||||
ECRecoverOverride *hexutil.Bytes // Override bytecode for ecrecover precompile.
|
||||
Calls []TransactionArgs
|
||||
}
|
||||
|
||||
|
|
@ -1271,10 +1270,6 @@ func (s *BlockChainAPI) MulticallV1(ctx context.Context, opts multicallOpts, blo
|
|||
if err := block.StateOverrides.ApplyMulticall(state, precompiles); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
// ECRecover replacement code will be fetched from statedb and executed as a normal EVM bytecode.
|
||||
if block.ECRecoverOverride != nil {
|
||||
state.SetCode(common.BytesToAddress([]byte{1}), *block.ECRecoverOverride)
|
||||
}
|
||||
hash := crypto.Keccak256Hash(blockContext.BlockNumber.Bytes())
|
||||
results[bi] = blockResult{
|
||||
Number: hexutil.Uint64(blockContext.BlockNumber.Uint64()),
|
||||
|
|
@ -1291,9 +1286,6 @@ func (s *BlockChainAPI) MulticallV1(ctx context.Context, opts multicallOpts, blo
|
|||
txhash := common.BigToHash(big.NewInt(int64(i)))
|
||||
state.SetTxContext(txhash, i)
|
||||
vmConfig := &vm.Config{NoBaseFee: true}
|
||||
if block.ECRecoverOverride != nil {
|
||||
vmConfig.DisableECRecover = true
|
||||
}
|
||||
if opts.TraceTransfers {
|
||||
vmConfig.Tracer = newTracer()
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue