Skip to content

Commit

Permalink
fix GetTransactionReceiptsByBlock
Browse files Browse the repository at this point in the history
  • Loading branch information
bbaktaeho committed Nov 16, 2023
1 parent d345879 commit 7714cd8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion internal/ethapi/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -723,8 +723,13 @@ func (s *BlockChainAPI) GetTransactionReceiptsByBlock(ctx context.Context, block
"logs": receipt.Logs,
"logsBloom": receipt.Bloom,
"type": hexutil.Uint(tx.Type()),
"effectiveGasPrice": (*hexutil.Big)(receipt.EffectiveGasPrice),

Check warning on line 726 in internal/ethapi/api.go

View check run for this annotation

Codecov / codecov/patch

internal/ethapi/api.go#L726

Added line #L726 was not covered by tests
}

if receipt.EffectiveGasPrice == nil {
fields["effectiveGasPrice"] = new(hexutil.Big)
}

Check warning on line 731 in internal/ethapi/api.go

View check run for this annotation

Codecov / codecov/patch

internal/ethapi/api.go#L729-L731

Added lines #L729 - L731 were not covered by tests

// Assign receipt status or post state.
if len(receipt.PostState) > 0 {
fields["root"] = hexutil.Bytes(receipt.PostState)
Expand All @@ -733,7 +738,7 @@ func (s *BlockChainAPI) GetTransactionReceiptsByBlock(ctx context.Context, block
}

if receipt.Logs == nil {
fields["logs"] = [][]*types.Log{}
fields["logs"] = []*types.Log{}

Check warning on line 741 in internal/ethapi/api.go

View check run for this annotation

Codecov / codecov/patch

internal/ethapi/api.go#L741

Added line #L741 was not covered by tests
}

if borReceipt != nil && idx == len(receipts)-1 {
Expand Down

0 comments on commit 7714cd8

Please sign in to comment.