forked from cerc-io/plugeth
internal/ethapi, accounts/abi/backends: use error defined in core (#26012)
Co-authored-by: seven <seven@nodereal.io>
This commit is contained in:
@@ -527,7 +527,7 @@ func (b *SimulatedBackend) EstimateGas(ctx context.Context, call ethereum.CallMs
|
||||
available := new(big.Int).Set(balance)
|
||||
if call.Value != nil {
|
||||
if call.Value.Cmp(available) >= 0 {
|
||||
return 0, errors.New("insufficient funds for transfer")
|
||||
return 0, core.ErrInsufficientFundsForTransfer
|
||||
}
|
||||
available.Sub(available, call.Value)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user