Skip to content

Commit fa8b9e4

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 1301e8f commit fa8b9e4

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
@@ -304,7 +304,6 @@ type SyncManager struct {
304304
rejectedTxns *apbf.Filter
305305
rejectedMixMsgs *apbf.Filter
306306
progressLogger *progresslog.Logger
307-
msgChan chan interface{}
308307

309308
// These fields track pending requests for data from all peers. They are
310309
// protected by the request mutex.
@@ -1889,13 +1888,6 @@ func (m *SyncManager) eventHandler(ctx context.Context) {
18891888
out:
18901889
for {
18911890
select {
1892-
case data := <-m.msgChan:
1893-
switch msg := data.(type) {
1894-
1895-
default:
1896-
log.Warnf("Invalid message type in event handler: %T", msg)
1897-
}
1898-
18991891
case <-m.hdrSyncState.stallTimer.C:
19001892
// Disconnect the sync peer due to stalling the header sync process.
19011893
m.syncPeerMtx.Lock()
@@ -2208,7 +2200,6 @@ func New(config *Config) *SyncManager {
22082200
minKnownWork: minKnownWork,
22092201
hdrSyncState: makeHeaderSyncState(),
22102202
progressLogger: progresslog.New("Processed", log),
2211-
msgChan: make(chan interface{}, config.MaxPeers*3),
22122203
quit: make(chan struct{}),
22132204
}
22142205
mgr.syncHeight.Store(config.Chain.BestSnapshot().Height)

0 commit comments

Comments
 (0)