eth: request id dispatcher and direct req/reply APIs (#23576)
* eth: request ID based message dispatcher * eth: fix dispatcher cancellation, rework fetchers idleness tracker * eth/downloader: drop peers who refuse to serve advertised chains
This commit is contained in:
@@ -18,8 +18,6 @@ package eth
|
||||
|
||||
import (
|
||||
"math/big"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/ethereum/go-ethereum/eth/protocols/eth"
|
||||
"github.com/ethereum/go-ethereum/eth/protocols/snap"
|
||||
@@ -36,11 +34,8 @@ type ethPeerInfo struct {
|
||||
// ethPeer is a wrapper around eth.Peer to maintain a few extra metadata.
|
||||
type ethPeer struct {
|
||||
*eth.Peer
|
||||
snapExt *snapPeer // Satellite `snap` connection
|
||||
|
||||
syncDrop *time.Timer // Connection dropper if `eth` sync progress isn't validated in time
|
||||
snapExt *snapPeer // Satellite `snap` connection
|
||||
snapWait chan struct{} // Notification channel for snap connections
|
||||
lock sync.RWMutex // Mutex protecting the internal fields
|
||||
}
|
||||
|
||||
// info gathers and returns some `eth` protocol metadata known about a peer.
|
||||
|
Reference in New Issue
Block a user