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).
Improved getblocks logging. #2126
pull rebroad wants to merge 2 commits into bitcoin:master from rebroad:ImproveGetblocksLogging changing 3 files +10 −9-
rebroad commented at 6:15 PM on December 23, 2012: contributor
-
Improved getblocks logging. da30975fe1
-
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?
BitcoinPullTester commented at 6:43 PM on December 23, 2012: noneAutomatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/da30975fe13ab227e1b48d68675e7cf8aa84d8e3 for binaries and test log.
No need to report block hash as block height is shown and hash can be derived from that. 2da3e92e55BitcoinPullTester commented at 7:12 PM on December 23, 2012: noneAutomatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/2da3e92e55f821514fe4f914eda8e78bcb960e2f for binaries and test log.
darkhosis commented at 11:44 AM on January 7, 2013: noneI 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.
BitcoinPullTester commented at 5:27 AM on January 24, 2013: noneAutomatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/2da3e92e55f821514fe4f914eda8e78bcb960e2f for binaries and test log.
luke-jr commented at 5:35 PM on January 30, 2013: memberAs darkhosis mentioned, logging IPs by default is a bad idea since it makes Bitcoin users targets for crackers who want to abuse the information.
rebroad commented at 2:30 AM on January 31, 2013: contributorI'll edit to remove the IP address logging... Will close until this is done.
rebroad closed this on Jan 31, 2013owlhooter referenced this in commit 1c9917e227 on Oct 11, 2018DrahtBot locked this on Sep 8, 2021
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
More mirrored repositories can be found on mirror.b10c.me