mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-31 00:53:46 +00:00
Added IsPrecompileAddr on EVM to let tracer easily determine if an address is a precompiled address
This commit is contained in:
parent
b9bcdef066
commit
d723124530
1 changed files with 5 additions and 0 deletions
|
|
@ -38,6 +38,11 @@ type (
|
|||
GetHashFunc func(uint64) common.Hash
|
||||
)
|
||||
|
||||
func (evm *EVM) IsPrecompileAddr(addr common.Address) bool {
|
||||
_, isPrecompile := evm.precompile(addr)
|
||||
return isPrecompile
|
||||
}
|
||||
|
||||
func (evm *EVM) precompile(addr common.Address) (PrecompiledContract, bool) {
|
||||
var precompiles map[common.Address]PrecompiledContract
|
||||
switch {
|
||||
|
|
|
|||
Loading…
Reference in a new issue