Skip to content

Commit

Permalink
Merge "Remove TODO comment for ledger syncIndex()"
Browse files Browse the repository at this point in the history
  • Loading branch information
Srinivasan Muralidharan authored and Gerrit Code Review committed Feb 12, 2017
2 parents c717c4b + 070acef commit 1d6cb59
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions common/ledger/blkstorage/fsblkstorage/blockfile_mgr.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1d6cb59

Please sign in to comment.