Otherwise the old client may fail to receive an alert saying they need to upgrade.
Relay alerts prior to MIN_PEER_PROTO_VERSION disconnect #4929
pull wtogami wants to merge 1 commits into bitcoin:master from wtogami:2014_9_oldpeer_after_alert changing 1 files +9 −5-
wtogami commented at 8:33 AM on September 16, 2014: contributor
-
in src/main.cpp:None in f137e32f90 outdated
3259 | @@ -3260,6 +3260,14 @@ string GetWarnings(string strFor) 3260 | return "error"; 3261 | } 3262 | 3263 | +void static RelayAlerts(CNode* pfrom) 3264 | +{ 3265 | + {
laanwj commented at 9:45 AM on September 16, 2014:No need for this extra level of indentation / braces
laanwj commented at 9:45 AM on September 16, 2014: memberSeems like a sane thing to do. utACK.
490c1c084bRelay alerts prior to MIN_PEER_PROTO_VERSION disconnect
Otherwise the old client may fail to receive an alert saying they need to upgrade.
wtogami force-pushed on Sep 16, 2014wtogami commented at 10:05 AM on September 16, 2014: contributorGot rid of the indentation.
BitcoinPullTester commented at 10:19 AM on September 16, 2014: noneAutomatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/p4929_490c1c084ba04d1e4228d225dcd980e76ed03221/ for binaries and test log. This test script verifies pulls every time they are updated. It, however, dies sometimes and fails to test properly. If you are waiting on a test, please check timestamps to verify that the test.log is moving at http://jenkins.bluematt.me/pull-tester/current/ Contact BlueMatt on freenode if something looks broken.
jgarzik commented at 12:49 PM on September 16, 2014: contributor- The stated logic makes no sense. They immediately receive a reject message indicating an upgrade is needed.
MIN_PEER_PROTO_VERSIONis for ancient nodes we simply refuse to talk to. Adding code for a test that will in practice never be executed is a waste.
laanwj commented at 1:57 PM on September 16, 2014: memberRight, we already send a reject before disconnecting, I forgot about that.
wtogami commented at 5:11 PM on September 16, 2014: contributor"They immediately receive a reject message indicating an upgrade is needed."
Eh? The reject messages were not part of the protocol until 0.9.
jgarzik commented at 5:14 PM on September 16, 2014: contributorIf a node has $this commit, then you also have a bitcoind that sends reject messages.
wtogami commented at 5:28 PM on September 16, 2014: contributorMy point is older clients don't actually do anything with the reject message.
jgarzik commented at 5:37 PM on September 16, 2014: contributorOlder clients do not do anything with the alert message either.
wtogami commented at 5:38 PM on September 16, 2014: contributorIs this patch actually harmful? No.
I'd like to also submit a patch to allow the user to configure MIN_PEER_PROTO_VERSION. Doing so lets you opt-out of talking to old, broken clients which in my experience cuts log spam.
jgarzik commented at 5:42 PM on September 16, 2014: contributorNo it's just redundant.
wtogami closed this on Sep 16, 2014MarcoFalke locked this on Sep 8, 2021Contributors
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-05-02 15:15 UTC
More mirrored repositories can be found on mirror.b10c.me