core/vm: add precompile cache

This commit is contained in:
MariusVanDerWijden 2025-06-10 22:40:06 +02:00
parent 17994c249e
commit 5b79f4d2da

View file

@ -228,8 +228,8 @@ func RunPrecompiledContract(addr common.Address, p PrecompiledContract, input []
}
suppliedGas -= gasCost
// Check the cache
if ouput, ok := getCache(addr, input); ok {
return ouput, suppliedGas, nil
if output, ok := getCache(addr, input); ok {
return output, suppliedGas, nil
}
output, err := p.Run(input)
if err == nil {