Skip to content

Commit

Permalink
netsync: Correct function name in comments
Browse files Browse the repository at this point in the history
These methods are called serially from the eventHandler method, not
syncHandler.
  • Loading branch information
jrick authored and davecgh committed Aug 7, 2024
1 parent fe43331 commit c69e915
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/netsync/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ func (m *SyncManager) onInitialChainSyncDone() {

// handlePeerConnectedMsg deals with new peers that have signalled they may
// be considered as a sync peer (they have already successfully negotiated). It
// also starts syncing if needed. It is invoked from the syncHandler goroutine.
// also starts syncing if needed. It is invoked from the eventHandler goroutine.
func (m *SyncManager) handlePeerConnectedMsg(ctx context.Context, peer *Peer) {
select {
case <-ctx.Done():
Expand All @@ -665,7 +665,7 @@ func (m *SyncManager) handlePeerConnectedMsg(ctx context.Context, peer *Peer) {
// handlePeerDisconnectedMsg deals with peers that have signalled they are done.
// It removes the peer as a candidate for syncing and in the case where it was
// the current sync peer, attempts to select a new best peer to sync from. It
// is invoked from the syncHandler goroutine.
// is invoked from the eventHandler goroutine.
func (m *SyncManager) handlePeerDisconnectedMsg(peer *Peer) {
// Remove the peer from the list of candidate peers.
delete(m.peers, peer)
Expand Down

0 comments on commit c69e915

Please sign in to comment.