Skip to content

Commit

Permalink
Add some logs
Browse files Browse the repository at this point in the history
  • Loading branch information
yzang2019 committed Oct 17, 2024
1 parent 9bf8752 commit d53293b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/blocksync/pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ func (pool *BlockPool) SetPeerRange(peerID types.NodeID, base int64, height int6

blockSyncPeers := pool.peerManager.GetBlockSyncPeers()
if len(blockSyncPeers) > 0 && !blockSyncPeers[peerID] {
pool.logger.Info(fmt.Sprintf("Skip adding peer %s for blocksync based on config, current num of blocksync peers: %d", peerID, len(blockSyncPeers)))
pool.logger.Info(fmt.Sprintf("Skip adding peer %s for blocksync, num of blocksync peers: %d, num of pool peers: %d", peerID, len(blockSyncPeers), len(pool.peers)))
return
}

Check warning on line 362 in internal/blocksync/pool.go

View check run for this annotation

Codecov / codecov/patch

internal/blocksync/pool.go#L360-L362

Added lines #L360 - L362 were not covered by tests

Expand All @@ -375,7 +375,7 @@ func (pool *BlockPool) SetPeerRange(peerID types.NodeID, base int64, height int6
logger: pool.logger.With("peer", peerID),
startAt: time.Now(),
}

pool.logger.Info(fmt.Sprintf("Adding peer %s to blocksync pool", peerID))
pool.peers[peerID] = peer
}

Expand Down

0 comments on commit d53293b

Please sign in to comment.