mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 15:16:43 +00:00
update
This commit is contained in:
parent
8028f6499f
commit
4195c1c0d3
1 changed files with 11 additions and 1 deletions
|
|
@ -60,6 +60,11 @@ const (
|
||||||
errMessageExecuting = -40012
|
errMessageExecuting = -40012
|
||||||
errEVMCancelled = -40013
|
errEVMCancelled = -40013
|
||||||
errEVMReverted = -40014
|
errEVMReverted = -40014
|
||||||
|
errEVMFastFailed = -40015
|
||||||
|
|
||||||
|
// internal error
|
||||||
|
errUnderlyingDB = -40020
|
||||||
|
errLoadingState = -40021
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
@ -253,7 +258,12 @@ func doOneCall(ctx context.Context, b Backend, state *state.StateDB, header *typ
|
||||||
// If the timer caused an abort, return an appropriate error message
|
// If the timer caused an abort, return an appropriate error message
|
||||||
if evm.Cancelled() {
|
if evm.Cancelled() {
|
||||||
result.Code = errEVMCancelled
|
result.Code = errEVMCancelled
|
||||||
result.Err = fmt.Sprintf("execution cancelled, either fast failed or exceeding timeout(%v)", singleCallTimeout)
|
result.Err = fmt.Sprintf("execution cancelled, timeout(%v)", singleCallTimeout)
|
||||||
|
// if execution time is close to timeout, not proper
|
||||||
|
if time.Since(start) < singleCallTimeout {
|
||||||
|
result.Code = errEVMFastFailed
|
||||||
|
result.Err = "fast failed"
|
||||||
|
}
|
||||||
return result, err
|
return result, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue