mirror of
https://github.com/i2p/i2p.i2p.git
synced 2026-06-07 17:31:43 +00:00
SSU2: Peer test result fix as Alice when we never got Charlie's RI
If we got msg 4 but not the RI, but we got msg 5 while waiting, we can still declare success and return OK instead of UNKNOWN, even though we never sent msg 6. See spec.
This commit is contained in:
@@ -740,7 +740,7 @@ class PeerTestManager {
|
||||
RouterInfo ri = _context.netDb().lookupRouterInfoLocally(h);
|
||||
if (ri == null) {
|
||||
if (_log.shouldInfo())
|
||||
_log.info("Delay after " + retryCount + " retries, no RI for " + h.toBase64());
|
||||
_log.info("Delay after receiving message " + msg + " and " + retryCount + " retries, no RI for " + h.toBase64());
|
||||
if (retryCount == 0)
|
||||
new DelayTest(from, fromPeer, msg, h, data);
|
||||
return false;
|
||||
@@ -1317,8 +1317,17 @@ class PeerTestManager {
|
||||
_log.warn("Signature failed msg 4 " + test + '\n' + charlieRI);
|
||||
}
|
||||
} else {
|
||||
// Without the RI we can't send msg 6, so we have to stop the test,
|
||||
// but if we did get msg 5 while waiting for the RI,
|
||||
// we can declare success.
|
||||
if (test.getCharlieIP() != null) {
|
||||
if (_log.shouldWarn())
|
||||
_log.warn("Charlie RI not found but got msg 5, declaring success " + test + ' ' + h);
|
||||
testComplete();
|
||||
return;
|
||||
}
|
||||
if (_log.shouldWarn())
|
||||
_log.warn("Charlie RI not found" + test + ' ' + h);
|
||||
_log.warn("Charlie RI not found " + test + ' ' + h);
|
||||
}
|
||||
}
|
||||
if (charlieIntroKey == null || charlieIP == null || charliePort <= 0) {
|
||||
|
||||
Reference in New Issue
Block a user