Makes diagnostics possible, reverse-header-sync a lot easier, and other uses.
Will BIP-ify if people like this.
NOTE: The CBestChain class was copied from COutPoint, if anyone was curious about the origin of that code.
Makes diagnostics possible, reverse-header-sync a lot easier, and other uses.
Will BIP-ify if people like this.
NOTE: The CBestChain class was copied from COutPoint, if anyone was curious about the origin of that code.
Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/60833778d4b8b6136e9e9b4d4916e27b85d08199 for binaries and test log.
As far as I know, getheaders can be used like getblocks, and will only report blocks that are in the (sender's) best chain already, so though that does technically not permit reverse-headers, it seems enough to get a fast header-only syncup.
Nothing in particular against this command, but I don't like adding P2P commands without specific use case.
Please make a BIP and discuss it on the mailing list. I think that should be procedure for adding P2P commands.
Granted, these commands are pretty trivial, but we should aim to keep protocol documentation, so that the developers of other clients can keep up.