Skip to content

Commit 4fe4520

Browse files
committed
address comments
1 parent 8ce6bf9 commit 4fe4520

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

dot/sync/chain_sync.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -700,7 +700,6 @@ func (cs *chainSync) doSync(req *network.BlockRequestMessage, peersTried map[pee
700700
}
701701

702702
func (cs *chainSync) handleReadyBlock(bd *types.BlockData) {
703-
// first check that the block isn't already in the ready queue
704703
if cs.readyBlocks.has(bd.Hash) {
705704
logger.Tracef("ignoring block %s in response, already in ready queue", bd.Hash)
706705
return
@@ -715,12 +714,11 @@ func (cs *chainSync) handleReadyBlock(bd *types.BlockData) {
715714
// let's check the db as maybe we already processed it
716715
has, err := cs.blockState.HasHeader(bd.Hash)
717716
if err != nil && !errors.Is(err, chaindb.ErrKeyNotFound) {
718-
logger.Debugf("failed to check if header is known for hash %s: err=%s", bd.Hash, err)
717+
logger.Debugf("failed to check if header is known for hash %s: %s", bd.Hash, err)
719718
return
720719
}
721720

722721
if has {
723-
// seems we already processed the block, so let's just return
724722
logger.Tracef("ignoring block we've already processed, hash=%s", bd.Hash)
725723
return
726724
}

dot/sync/tip_syncer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import (
1414

1515
var _ workHandler = &tipSyncer{}
1616

17-
type handleReadyBlockFunc = func(*types.BlockData)
17+
type handleReadyBlockFunc func(*types.BlockData)
1818

1919
// tipSyncer handles workers when syncing at the tip of the chain
2020
type tipSyncer struct {

0 commit comments

Comments
 (0)