forked from cerc-io/laconicd-deprecated
fix(rpc): estimate gas error response (#1340)
* format error on EstimateGas rpc call * changelog Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
This commit is contained in:
co-authored by
Federico Kunze Küllmer
parent
592e75b909
commit
5c80a55287
@@ -303,6 +303,12 @@ func (b *Backend) EstimateGas(args evmtypes.TransactionArgs, blockNrOptional *rp
|
||||
GasCap: b.RPCGasCap(),
|
||||
}
|
||||
|
||||
_, err = b.TendermintBlockByNumber(blockNr)
|
||||
if err != nil {
|
||||
// the error message imitates geth behavior
|
||||
return 0, errors.New("header not found")
|
||||
}
|
||||
|
||||
// From ContextWithHeight: if the provided height is 0,
|
||||
// it will return an empty context and the gRPC query will use
|
||||
// the latest block height for querying.
|
||||
|
||||
Reference in New Issue
Block a user