Skip to content

Commit 979947d

Browse files
committed
netsync: Remove unused msg channel.
This removes the event handler message channel since it is no longer used. This is a part of the overall effort to convert the code related to handling the various sync manager events to synchronous code that runs in the various caller goroutines.
1 parent 8b1e06e commit 979947d

1 file changed

Lines changed: 0 additions & 9 deletions

File tree

internal/netsync/manager.go

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,6 @@ type SyncManager struct {
321321
rejectedTxns *apbf.Filter
322322
rejectedMixMsgs *apbf.Filter
323323
progressLogger *progresslog.Logger
324-
msgChan chan interface{}
325324

326325
// These fields track pending requests for data from all peers. They are
327326
// protected by the request mutex.
@@ -2001,13 +2000,6 @@ func (m *SyncManager) eventHandler(ctx context.Context) {
20012000
out:
20022001
for {
20032002
select {
2004-
case data := <-m.msgChan:
2005-
switch msg := data.(type) {
2006-
2007-
default:
2008-
log.Warnf("Invalid message type in event handler: %T", msg)
2009-
}
2010-
20112003
case <-m.hdrSyncState.stallTimer.C:
20122004
// Disconnect the sync peer due to stalling the header sync process.
20132005
m.syncPeerMtx.Lock()
@@ -2325,7 +2317,6 @@ func New(config *Config) *SyncManager {
23252317
minKnownWork: minKnownWork,
23262318
hdrSyncState: makeHeaderSyncState(),
23272319
progressLogger: progresslog.New("Processed", log),
2328-
msgChan: make(chan interface{}, config.MaxPeers*3),
23292320
quit: make(chan struct{}),
23302321
}
23312322
mgr.syncHeight.Store(config.Chain.BestSnapshot().Height)

0 commit comments

Comments
 (0)