Skip to content

Commit

Permalink
Fix behavior of eth_getTransactionHash for pending transactions (ethe…
Browse files Browse the repository at this point in the history
…reum#1217)

* Fix eth_getTransactionReceipt

* fix behavior of GetTransactionReceipt

* align logix exactly to upstream
  • Loading branch information
Victor "Nate" Graf authored Nov 7, 2020
1 parent 9f63d35 commit 7c5ddbd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/ethapi/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -1326,8 +1326,8 @@ func (s *PublicTransactionPoolAPI) GetRawTransactionByHash(ctx context.Context,
// GetTransactionReceipt returns the transaction receipt for the given transaction hash.
func (s *PublicTransactionPoolAPI) GetTransactionReceipt(ctx context.Context, hash common.Hash) (map[string]interface{}, error) {
tx, blockHash, blockNumber, index, err := s.b.GetTransaction(ctx, hash)
if err != nil || tx == nil {
return nil, err
if err != nil {
return nil, nil
}
receipts, err := s.b.GetReceipts(ctx, blockHash)
if err != nil {
Expand Down

0 comments on commit 7c5ddbd

Please sign in to comment.