internal/ethapi: added binary data to revertError data

This commit is contained in:
Marius van der Wijden
2020-06-04 10:40:23 +02:00
committed by Péter Szilágyi
parent 4515f84958
commit c9deb8a227
3 changed files with 10 additions and 10 deletions

View File

@ -899,8 +899,8 @@ func (s *PublicBlockChainAPI) Call(ctx context.Context, args CallArgs, blockNrOr
reason, err := abi.UnpackRevert(result.Revert())
if err == nil {
return nil, &revertError{
error: errors.New("execution reverted"),
errData: reason,
error: fmt.Errorf("execution reverted: %v", reason),
errData: result.Revert(),
}
}
}
@ -1003,8 +1003,8 @@ func DoEstimateGas(ctx context.Context, b Backend, args CallArgs, blockNrOrHash
reason, err := abi.UnpackRevert(result.Revert())
if err == nil {
return 0, &revertError{
error: errors.New("execution reverted"),
errData: reason,
error: fmt.Errorf("execution reverted: %v", reason),
errData: result.Revert(),
}
}
}