mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-19 21:31:37 +00:00
internal/ethapi: fix Call handle revert error
This commit is contained in:
parent
48d1f22fde
commit
517f4a16a6
1 changed files with 1 additions and 1 deletions
|
|
@ -1448,7 +1448,7 @@ func (s *PublicBlockChainAPI) Call(ctx context.Context, args TransactionArgs, bl
|
|||
return nil, err
|
||||
}
|
||||
// If the result contains a revert reason, try to unpack and return it.
|
||||
if result.Failed() && len(result.Return()) > 0 {
|
||||
if result.Failed() {
|
||||
return nil, newRevertError(result.Return())
|
||||
}
|
||||
return result.Return(), nil
|
||||
|
|
|
|||
Loading…
Reference in a new issue