Improved getblocks logging. #2126

pull rebroad wants to merge 2 commits into bitcoin:master from rebroad:ImproveGetblocksLogging changing 3 files +10 −9
  1. rebroad commented at 6:15 PM on December 23, 2012: contributor

    Adds some useful debug info to help keep track of getblock requests. Only shows request if actually carried out (previously showed request even if it wasn't done).

  2. Improved getblocks logging. da30975fe1
  3. in src/main.cpp:None in da30975fe1 outdated
    2205 | @@ -2206,7 +2206,8 @@ bool ProcessBlock(CNode* pfrom, CBlock* pblock, CDiskBlockPos *dbp)
    2206 |              mapOrphanBlocksByPrev.insert(make_pair(pblock2->hashPrevBlock, pblock2));
    2207 |  
    2208 |              // Ask this guy to fill in what we're missing
    2209 | -            pfrom->PushGetBlocks(pindexBest, GetOrphanRoot(pblock2));
    2210 | +            if (pfrom->PushGetBlocks(pindexBest, GetOrphanRoot(pblock2)))
    2211 | +                printf("fill-in getblocks to %s\n", pfrom->addr.ToString().c_str());
    


    rebroad commented at 6:16 PM on December 23, 2012:

    I've just noticed by code includes detail of the node it's requesting to. Is this ok, or shall I make it dependant on a command-line option?

  4. BitcoinPullTester commented at 6:43 PM on December 23, 2012: none

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

  5. No need to report block hash as block height is shown and hash can be derived from that. 2da3e92e55
  6. BitcoinPullTester commented at 7:12 PM on December 23, 2012: none

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

  7. darkhosis commented at 11:44 AM on January 7, 2013: none

    I like it. I already modified the source myself to include the IPs that were requesting blocks (so I could tcpkill the lunatic clients).... I remember asking about that in the dev channel and they prefer not to have the IPs show up.

    I run a bitcoind (or two) on my home connection from time to time & with my CPU and 32GB RAM, if I have 200 connections, I can see about 100 of those block requests... but with a max of 1536kbps upstream, they aren't going anywhere.

  8. BitcoinPullTester commented at 5:27 AM on January 24, 2013: none

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

  9. luke-jr commented at 5:35 PM on January 30, 2013: member

    As darkhosis mentioned, logging IPs by default is a bad idea since it makes Bitcoin users targets for crackers who want to abuse the information.

  10. Diapolo commented at 6:41 PM on January 30, 2013: none

    @luke-jr Agreed

  11. rebroad commented at 2:30 AM on January 31, 2013: contributor

    I'll edit to remove the IP address logging... Will close until this is done.

  12. rebroad closed this on Jan 31, 2013

  13. owlhooter referenced this in commit 1c9917e227 on Oct 11, 2018
  14. 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-14 21:15 UTC

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