Revert "eth: drop eth/65, the last non-reqid protocol version" (#23426)

This commit is contained in:
Péter Szilágyi
2021-08-20 15:14:21 +03:00
committed by GitHub
parent 5566e5d152
commit c368f728c1
15 changed files with 602 additions and 172 deletions

View File

@ -117,6 +117,7 @@ type handler struct {
whitelist map[uint64]common.Hash
// channels for fetcher, syncer, txsyncLoop
txsyncCh chan *txsync
quitSync chan struct{}
chainSync *chainSyncer
@ -139,6 +140,7 @@ func newHandler(config *handlerConfig) (*handler, error) {
chain: config.Chain,
peers: newPeerSet(),
whitelist: config.Whitelist,
txsyncCh: make(chan *txsync),
quitSync: make(chan struct{}),
}
if config.Sync == downloader.FullSync {
@ -406,8 +408,9 @@ func (h *handler) Start(maxPeers int) {
go h.minedBroadcastLoop()
// start sync handlers
h.wg.Add(1)
h.wg.Add(2)
go h.chainSync.loop()
go h.txsyncLoop64() // TODO(karalabe): Legacy initial tx echange, drop with eth/64.
}
func (h *handler) Stop() {