Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syncstorewjb #19284

Merged
merged 3 commits into from
Feb 18, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions chia/full_node/full_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -778,7 +778,11 @@ async def new_peak(self, request: full_node_protocol.NewPeak, peer: WSChiaConnec
full_node_protocol.RequestBlock(target_peak.height, False),
timeout=10,
)
if target_peak_response is not None and isinstance(target_peak_response, RespondBlock):
if (
target_peak_response is not None
and isinstance(target_peak_response, RespondBlock)
and target_peak_response.block.header_hash == target_peak.header_hash
):
self.sync_store.peer_has_block(
target_peak.header_hash,
peer.peer_node_id,
Expand Down Expand Up @@ -1022,7 +1026,11 @@ async def _sync(self) -> None:
)
)
for i, target_peak_response in enumerate(await asyncio.gather(*coroutines)):
if target_peak_response is not None and isinstance(target_peak_response, RespondBlock):
if (
target_peak_response is not None
and isinstance(target_peak_response, RespondBlock)
and target_peak_response.block.header_hash == target_peak.header_hash
):
self.sync_store.peer_has_block(
target_peak.header_hash, peers[i].peer_node_id, target_peak.weight, target_peak.height, False
)
Expand Down
Loading