From dc6a208f1de6dc5980311582c3d8aab2433ddcb7 Mon Sep 17 00:00:00 2001 From: Thane Thomson Date: Fri, 29 Apr 2022 17:49:35 -0400 Subject: [PATCH] Expand on comment for PeekTwoBlocks for posterity Signed-off-by: Thane Thomson --- internal/blocksync/pool.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/internal/blocksync/pool.go b/internal/blocksync/pool.go index 962e3d8a7..72ce81fca 100644 --- a/internal/blocksync/pool.go +++ b/internal/blocksync/pool.go @@ -200,9 +200,12 @@ func (pool *BlockPool) IsCaughtUp() bool { return pool.height >= (pool.maxPeerHeight - 1) } -// PeekTwoBlocks returns blocks at pool.height and pool.height+1. -// We need to see the second block's Commit to validate the first block. -// So we peek two blocks at a time. +// PeekTwoBlocks returns blocks at pool.height and pool.height+1. We need to +// see the second block's Commit to validate the first block. So we peek two +// blocks at a time. We return an extended commit, containing vote extensions +// and their associated signatures, as this is critical to consensus in ABCI++ +// as we switch from block sync to consensus mode. +// // The caller will verify the commit. func (pool *BlockPool) PeekTwoBlocks() (first *types.Block, second *types.Block, firstExtCommit *types.ExtendedCommit) { pool.mtx.RLock()