mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 15:16:43 +00:00
Update depth for precompile calls
This commit is contained in:
parent
d6ee041f53
commit
beaf8119e7
1 changed files with 2 additions and 0 deletions
|
|
@ -174,6 +174,8 @@ func ActivePrecompiles(rules params.Rules) []common.Address {
|
|||
// - the _remaining_ gas,
|
||||
// - any error that occurred
|
||||
func RunPrecompiledContract(p PrecompiledContract, evm *EVM, sender common.Address, callingContract common.Address, input []byte, suppliedGas uint64, value *big.Int, logger *tracing.Hooks, readOnly bool) (ret []byte, remainingGas uint64, err error) {
|
||||
evm.depth++
|
||||
defer func() { evm.depth-- }()
|
||||
if dp, ok := p.(DynamicGasPrecompiledContract); ok {
|
||||
return dp.RunAndCalculateGas(evm, sender, callingContract, input, suppliedGas, value, logger, readOnly)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue