mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 07:06:42 +00:00
check error before returning empty
This commit is contained in:
parent
c9eb773740
commit
bbac97c0d8
1 changed files with 3 additions and 3 deletions
|
|
@ -298,12 +298,12 @@ func processRequestsSystemCall(requests *[][]byte, evm *vm.EVM, requestType byte
|
|||
evm.StateDB.AddAddressToAccessList(addr)
|
||||
ret, _, err := evm.Call(msg.From, *msg.To, msg.Data, 30_000_000, common.U2560)
|
||||
evm.StateDB.Finalise(true)
|
||||
if len(ret) == 0 {
|
||||
return nil // skip empty output
|
||||
}
|
||||
if err != nil {
|
||||
return fmt.Errorf("system call failed to execute: %v", err)
|
||||
}
|
||||
if len(ret) == 0 {
|
||||
return nil // skip empty output
|
||||
}
|
||||
// Append prefixed requestsData to the requests list.
|
||||
requestsData := make([]byte, len(ret)+1)
|
||||
requestsData[0] = requestType
|
||||
|
|
|
|||
Loading…
Reference in a new issue