Open
Conversation
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
d9c8647 to
48a6745
Compare
48a6745 to
865141a
Compare
fix: update p2p package for go-ethereum 1.17.0 RawList API changes go-ethereum 1.17.0 changed eth protocol types to use rlp.RawList for lazy decoding optimization: - BlockHeadersPacket.List replaces BlockHeadersRequest - BlockBodiesPacket.List replaces BlockBodiesResponse - PooledTransactionsPacket.List replaces PooledTransactionsResponse - BlockBody fields now use rlp.RawList instead of slices - TransactionsPacket embeds rlp.RawList Updated all p2p code to use .Len() instead of len(), .Items() for decoding, and rlp.EncodeToRawList() for encoding.
Member
Code reviewFound 2 issues:
Lines 443 to 447 in d8ec9e3 Lines 546 to 550 in d8ec9e3 Lines 1126 to 1129 in d8ec9e3
polygon-cli/cmd/p2p/sensor/rpc.go Lines 237 to 252 in d8ec9e3 🤖 Generated with Claude Code - If this code review was useful, please react with 👍. Otherwise, react with 👎. |
2c33ec7 to
33ea396
Compare
Combined latestBlockHash and latestBlockNumber into a single latestBlockInfo struct protected by ds.Locked. This ensures atomic updates and prevents race conditions where hash and number could become mismatched when multiple goroutines update concurrently. Affected handlers: - handleBlockRangeUpdate: uses atomic Update with conditional check - handleNewBlockHashes: uses atomic Update with conditional check - handleNewBlock: uses atomic Set (always authoritative)
33ea396 to
f2d33a1
Compare
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Description
Jira / Linear Tickets
Testing