upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/src/nostr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/nostr.cpp')
-rw-r--r--src/nostr.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/nostr.cpp b/src/nostr.cpp
index dc96be2..1fd60ad 100644
--- a/src/nostr.cpp
+++ b/src/nostr.cpp
@@ -1596,6 +1596,8 @@ static void ConnectDiscoveredBtfPeers()
1596 // handshakes refused, which then looks exactly like "dead peers" even 1596 // handshakes refused, which then looks exactly like "dead peers" even
1597 // though the descriptors were perfectly resolvable. 1597 // though the descriptors were perfectly resolvable.
1598 map<string, BtfResolvedPeer> resolved; 1598 map<string, BtfResolvedPeer> resolved;
1599 for (const string& addr : candidates)
1600 BtfChurnNoteResolveAttempt();
1599 BtfResolveMany(candidates, resolved); 1601 BtfResolveMany(candidates, resolved);
1600 1602
1601 // Candidates whose descriptor didn't resolve this pass are recorded as a 1603 // Candidates whose descriptor didn't resolve this pass are recorded as a
@@ -1608,9 +1610,11 @@ static void ConnectDiscoveredBtfPeers()
1608 { 1610 {
1609 if (resolved.count(addr)) 1611 if (resolved.count(addr))
1610 { 1612 {
1613 BtfChurnNoteResolveResult(true);
1611 toDial.push_back(addr); 1614 toDial.push_back(addr);
1612 continue; 1615 continue;
1613 } 1616 }
1617 BtfChurnNoteResolveResult(false);
1614 int n = ++g_btfPeerFails[addr]; 1618 int n = ++g_btfPeerFails[addr];
1615 int64 cap = (n >= BTF_CHRONIC_FAIL_THRESHOLD) ? BTF_BACKOFF_CAP_SECS_DEAD 1619 int64 cap = (n >= BTF_CHRONIC_FAIL_THRESHOLD) ? BTF_BACKOFF_CAP_SECS_DEAD
1616 : BTF_BACKOFF_CAP_SECS; 1620 : BTF_BACKOFF_CAP_SECS;