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:
@ -231,9 +231,9 @@ func New(checkpoint uint64, stateDb ethdb.Database, stateBloom *trie.SyncBloom,
|
||||
stateCh: make(chan dataPack),
|
||||
SnapSyncer: snap.NewSyncer(stateDb),
|
||||
stateSyncStart: make(chan *stateSync),
|
||||
syncStatsState: stateSyncStats{
|
||||
processed: rawdb.ReadFastTrieProgress(stateDb),
|
||||
},
|
||||
//syncStatsState: stateSyncStats{
|
||||
// processed: rawdb.ReadFastTrieProgress(stateDb),
|
||||
//},
|
||||
trackStateReq: make(chan *stateReq),
|
||||
}
|
||||
go dl.stateFetcher()
|
||||
@ -268,8 +268,8 @@ func (d *Downloader) Progress() ethereum.SyncProgress {
|
||||
StartingBlock: d.syncStatsChainOrigin,
|
||||
CurrentBlock: current,
|
||||
HighestBlock: d.syncStatsChainHeight,
|
||||
PulledStates: d.syncStatsState.processed,
|
||||
KnownStates: d.syncStatsState.processed + d.syncStatsState.pending,
|
||||
//PulledStates: d.syncStatsState.processed,
|
||||
//KnownStates: d.syncStatsState.processed + d.syncStatsState.pending,
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user