Add "getbestchain" P2P request, and "bestchain" reply #1876

pull jgarzik wants to merge 1 commits into bitcoin:master from jgarzik:gettop changing 3 files +52 −1
  1. jgarzik commented at 7:52 PM on September 27, 2012: contributor

    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.

  2. Add "getbestchain" P2P request, and "bestchain" reply 60833778d4
  3. BitcoinPullTester commented at 12:18 PM on September 28, 2012: none

    Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/60833778d4b8b6136e9e9b4d4916e27b85d08199 for binaries and test log.

  4. sipa commented at 1:55 PM on September 28, 2012: member

    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.

  5. laanwj commented at 9:22 AM on September 29, 2012: member

    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.

  6. jgarzik commented at 9:19 PM on October 3, 2012: contributor

    @laanwj See OP, "Will BIP-ify if people like this."

    No big use case outside of diagnostics (probing network to see how many are stuck), so closing

  7. jgarzik closed this on Oct 3, 2012

  8. jgarzik deleted the branch on Aug 24, 2014
  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-20 00:16 UTC

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