Skip to content

Commit 7a5d58e

Browse files
committed
add block proposal to attestation pool during chekpoint
1 parent 3c724b0 commit 7a5d58e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

yarn-project/p2p/src/client/p2p_client.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,8 +338,13 @@ export class P2PClient<T extends P2PClientType = P2PClientType.Full>
338338
[Attributes.BLOCK_ARCHIVE]: proposal.archive.toString(),
339339
[Attributes.P2P_ID]: (await proposal.p2pMessageLoggingIdentifier()).toString(),
340340
}))
341-
public broadcastCheckpointProposal(proposal: CheckpointProposal): Promise<void> {
341+
public async broadcastCheckpointProposal(proposal: CheckpointProposal): Promise<void> {
342342
this.log.verbose(`Broadcasting checkpoint proposal for slot ${proposal.slotNumber} to peers`);
343+
const blockProposal = proposal.getBlockProposal();
344+
if (blockProposal) {
345+
// Store our own last-block proposal so we can respond to req/resp requests for it.
346+
await this.attestationPool.addBlockProposal(blockProposal);
347+
}
343348
return this.p2pService.propagate(proposal);
344349
}
345350

0 commit comments

Comments
 (0)