Apply suggestions from code review

Co-authored-by: M. J. Fromberger <fromberger@interchain.io>
This commit is contained in:
Thane Thomson
2022-05-09 06:32:53 -04:00
committed by GitHub
co-authored by M. J. Fromberger
parent 9483b42f0b
commit b1896ebca6
7 changed files with 17 additions and 22 deletions
+2 -2
View File
@@ -188,7 +188,7 @@ func (r *Reactor) respondToPeer(ctx context.Context, msg *bcproto.BlockRequest,
if block != nil {
extCommit := r.store.LoadBlockExtendedCommit(msg.Height)
if extCommit == nil {
return fmt.Errorf("blockstore has block but not extended commit (block: %v)", block)
return fmt.Errorf("found block in store without extended commit: %v", block)
}
blockProto, err := block.ToProto()
if err != nil {
@@ -465,7 +465,7 @@ func (r *Reactor) poolRoutine(ctx context.Context, stateSynced bool, blockSyncCh
switch {
//case state.LastBlockHeight > 0 && r.store.LoadBlockExtCommit(state.LastBlockHeight) == nil:
case state.LastBlockHeight > 0 && blocksSynced == 0:
//If we have state-synced, we need to blocksync at least one block
// Having state-synced, we need to blocksync at least one block
r.logger.Info(
"no seen commit yet",
"height", height,