From 070acef0d5492769b51bf05b15ab1c220fb107e8 Mon Sep 17 00:00:00 2001 From: denyeart Date: Sun, 12 Feb 2017 05:40:34 -0500 Subject: [PATCH] Remove TODO comment for ledger syncIndex() The TODO was recently addressed. Cleaning up the TODO here. Change-Id: I0cd9c5feedc847a73296c7e46a7a5ac2b0d1e468 Signed-off-by: denyeart --- common/ledger/blkstorage/fsblkstorage/blockfile_mgr.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common/ledger/blkstorage/fsblkstorage/blockfile_mgr.go b/common/ledger/blkstorage/fsblkstorage/blockfile_mgr.go index a2599a3a468..67e44483697 100644 --- a/common/ledger/blkstorage/fsblkstorage/blockfile_mgr.go +++ b/common/ledger/blkstorage/fsblkstorage/blockfile_mgr.go @@ -354,9 +354,9 @@ func (mgr *blockfileMgr) syncIndex() error { } } - //Should be at the last block, but go ahead and loop looking for next blockBytes - //If there is another block, add it to the index - //TODO Currently this re-indexes the lastBlockIndexed every time. May be better to skip it. + //Should be at the last block already, but go ahead and loop looking for next blockBytes. + //If there is another block, add it to the index. + //This will ensure block indexes are correct, for example if peer had crashed before indexes got updated. for { if blockBytes, blockPlacementInfo, err = stream.nextBlockBytesAndPlacementInfo(); err != nil { return err