Skip to content

Commit

Permalink
fix to return empty hash at error case
Browse files Browse the repository at this point in the history
  • Loading branch information
beer-1 committed Jul 17, 2024
1 parent 33fded6 commit 9d899c7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion jsonrpc/backend/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@ func (b *JSONRPCBackend) SendRawTransaction(input hexutil.Bytes) (common.Hash, e
return common.Hash{}, err
}

return tx.Hash(), b.SendTx(tx)
if err := b.SendTx(tx); err != nil {
return common.Hash{}, err
}

return tx.Hash(), nil
}

func (b *JSONRPCBackend) SendTx(tx *coretypes.Transaction) error {
Expand Down

0 comments on commit 9d899c7

Please sign in to comment.