Post-feb20 simplifications #873

pull sipa wants to merge 1 commits into bitcoin:master from sipa:postfeb20 changing 3 files +27 −39
  1. sipa commented at 12:34 AM on February 20, 2012: member

    Now the entire network upgraded to (initial) protocol version 209, certain simplifications in the source code are possible.

  2. in src/main.cpp:None in c1dd4562d7 outdated
    2099 | @@ -2100,18 +2100,21 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
    2100 |          CAddress addrFrom;
    2101 |          uint64 nNonce = 1;
    2102 |          vRecv >> pfrom->nVersion >> pfrom->nServices >> nTime >> addrMe;
    2103 | +        if (pfrom->nVersion < 209) // Versions below 209 are not supported anymore since Feb 20, 2012
    


    Plaidxx commented at 3:41 PM on February 20, 2012:

    Instead of disconnecting when we see a version that's less than 209, shouldn't we just force it do v. 209? This would keep the same behavior we currently have and in the remote possibility that someone is running a pre-209 version that they have patched to include the checksum in version and verack, it will continue to work.


    laanwj commented at 6:22 PM on February 20, 2012:

    That won't really work, because this commit removes all compatibility with pre-209 versions, not only in the version/verack message but also other messages/fields.


    Plaidxx commented at 7:56 PM on February 20, 2012:

    Right, all I'm saying is if a node identifies itself as pre-209, instead of simply disconnecting, treat it as if it's version 209. That way if there are nodes that in fact support the newer protocol, but identify themselves as pre-209, they will still work. If they don't support the newer protocol, the messages won't work anyway and nothing is lost. Cases where this could potentially happen-- patched pre-209 reference clients, alternative clients, clients that mis-identify themselves in terms of version. It just strikes me as being more fault-tolerant than disconnecting right away.

    That said, it's probably not a huge deal. Just thought I'd bring it up for consideration.


    sipa commented at 7:42 PM on February 21, 2012:

    I prefer to fail hard, though some warning to the log file is probably useful in this case.

  3. Post-feb20 simplifications
    Now the entire network upgraded to (initial) protocol version 209,
    crtainl simplifications in the source code are possible.
    18c0fa97d0
  4. sipa commented at 7:48 PM on February 21, 2012: member

    Added debug output in case a pre-209 version manages to connect.

  5. gavinandresen commented at 4:08 PM on February 22, 2012: contributor

    ACK; pull requests that remove code are my favorite kind of pull requests.

  6. gavinandresen merged this on Feb 22, 2012
  7. gavinandresen closed this on Feb 22, 2012

  8. ptschip referenced this in commit 5e864878c6 on Jan 5, 2018
  9. DrahtBot locked this on Sep 8, 2021

github-metadata-mirror

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-04-19 09:16 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me