Skip to content

fix(api): return pending block receipts correctly#32457

Closed
calbera wants to merge 1 commit intoethereum:masterfrom
berachain:support-pending-block-receipts
Closed

fix(api): return pending block receipts correctly#32457
calbera wants to merge 1 commit intoethereum:masterfrom
berachain:support-pending-block-receipts

Conversation

@calbera
Copy link
Copy Markdown

@calbera calbera commented Aug 16, 2025

Closes #32456

Let me know if this approach is wrong or just poorly executed.

Tested on local node running bera-geth.

Comment thread internal/ethapi/api.go
Comment on lines +608 to +610
if pendingBlock.Hash() != block.Hash() {
return nil, fmt.Errorf("pending block hash mismatch: %s vs %s", pendingBlock.Hash(), block.Hash())
}
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This feels very dirty as we are forced to make two separate calls to miner.Pending() during execution of GetBlockReceipts.

If open to a larger refactor, one possibility is returning receipts in BlockByNumberOrHash

@calbera
Copy link
Copy Markdown
Author

calbera commented Aug 18, 2025

Replaced by #32461

@calbera calbera closed this Aug 18, 2025
@calbera calbera deleted the support-pending-block-receipts branch October 1, 2025 21:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

JSON RPC method eth_getBlockReceipts fails for "pending" block

1 participant