p2p: add check for selfID in dialNext

Reduce snapshot interval to 3
This commit is contained in:
Jasmina Malicevic
2022-07-18 12:25:56 +02:00
parent 4f8bde0d87
commit 7449bb4427
2 changed files with 2 additions and 2 deletions

View File

@@ -549,7 +549,7 @@ func (m *PeerManager) TryDialNext() NodeAddress {
}
for _, peer := range m.store.Ranked() {
if m.dialing[peer.ID] || m.isConnected(peer.ID) {
if m.dialing[peer.ID] || m.isConnected(peer.ID) || peer.ID == m.selfID {
continue
}

View File

@@ -49,7 +49,7 @@ var (
e2e.StateSyncRPC: 45,
}
nodePersistIntervals = uniformChoice{0, 1, 5}
nodeSnapshotIntervals = uniformChoice{0, 5}
nodeSnapshotIntervals = uniformChoice{0, 3}
nodeRetainBlocks = uniformChoice{
0,
2 * int(e2e.EvidenceAgeHeight),