Skip to content

Commit 070acef

Browse files
committed
Remove TODO comment for ledger syncIndex()
The TODO was recently addressed. Cleaning up the TODO here. Change-Id: I0cd9c5feedc847a73296c7e46a7a5ac2b0d1e468 Signed-off-by: denyeart <[email protected]>
1 parent c341fe5 commit 070acef

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

common/ledger/blkstorage/fsblkstorage/blockfile_mgr.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -354,9 +354,9 @@ func (mgr *blockfileMgr) syncIndex() error {
354354
}
355355
}
356356

357-
//Should be at the last block, but go ahead and loop looking for next blockBytes
358-
//If there is another block, add it to the index
359-
//TODO Currently this re-indexes the lastBlockIndexed every time. May be better to skip it.
357+
//Should be at the last block already, but go ahead and loop looking for next blockBytes.
358+
//If there is another block, add it to the index.
359+
//This will ensure block indexes are correct, for example if peer had crashed before indexes got updated.
360360
for {
361361
if blockBytes, blockPlacementInfo, err = stream.nextBlockBytesAndPlacementInfo(); err != nil {
362362
return err

0 commit comments

Comments
 (0)