File tree Expand file tree Collapse file tree 3 files changed +7
-2
lines changed Expand file tree Collapse file tree 3 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -294,6 +294,10 @@ grothendieck {
294
294
# same peer for previous blocks, until we find one that we have a parent for. This setting determines the batch size
295
295
# of such query (number of blocks returned in a single query).
296
296
block-resolving-depth = 20
297
+
298
+ # size of the list that keeps track of peers that are failing to provide us with mpt node
299
+ # we switch them to download only blockchain elements
300
+ fastsync-block-chain-only-peers-pool = 100
297
301
}
298
302
299
303
pruning {
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ import scala.concurrent.ExecutionContext.Implicits.global
5
5
import akka .actor ._
6
6
import akka .util .ByteString
7
7
import io .iohk .ethereum .domain .BlockHeader
8
- import io .iohk .ethereum .network .{EtcPeerManagerActor , Peer , PeerActor }
8
+ import io .iohk .ethereum .network .{EtcPeerManagerActor , Peer }
9
9
import io .iohk .ethereum .network .PeerEventBusActor .PeerEvent .MessageFromPeer
10
10
import io .iohk .ethereum .network .PeerEventBusActor .{PeerSelector , Subscribe , Unsubscribe }
11
11
import io .iohk .ethereum .network .PeerEventBusActor .SubscriptionClassifier .MessageClassifier
@@ -235,7 +235,7 @@ trait FastSync {
235
235
236
236
private def handleFailingMptPeers : Receive = {
237
237
case BlockChainOnlyDownload (peer) =>
238
- blockChainOnlyPeers = blockChainOnlyPeers + peer
238
+ blockChainOnlyPeers = ( blockChainOnlyPeers + peer).take(blockChainOnlyPeersPoolSize)
239
239
}
240
240
241
241
private def printStatus () = {
Original file line number Diff line number Diff line change @@ -116,6 +116,7 @@ object Config {
116
116
117
117
val checkForNewBlockInterval : FiniteDuration = syncConfig.getDuration(" check-for-new-block-interval" ).toMillis.millis
118
118
val blockResolveDepth : Int = syncConfig.getInt(" block-resolving-depth" )
119
+ val blockChainOnlyPeersPoolSize : Int = syncConfig.getInt(" fastsync-block-chain-only-peers-pool" )
119
120
}
120
121
121
122
trait DbConfig {
You can’t perform that action at this time.
0 commit comments