Remove unused args from GetFetchFlags() #10311
pull btcdrak wants to merge 1 commits into bitcoin:master from btcdrak:getflags changing 1 files +9 −9-
btcdrak commented at 7:44 am on May 2, 2017: contributor
-
Remove unused args from GetFetchhFlags() 1ff2bb4e3e
-
dcousens approved
-
dcousens commented at 8:11 am on May 2, 2017: contributorutACK
-
kallewoof approved
-
fanquake added the label Refactoring on May 2, 2017
-
practicalswift commented at 2:04 pm on May 2, 2017: contributor
utACK
Nice find! Can’t believe I didn’t catch this one myself :-)
-
paveljanik commented at 2:51 pm on May 2, 2017: contributor
-
in src/net_processing.cpp:1165 in 1ff2bb4e3e
1161@@ -1162,7 +1162,7 @@ void static ProcessGetData(CNode* pfrom, const Consensus::Params& consensusParam 1162 } 1163 } 1164 1165-uint32_t GetFetchFlags(CNode* pfrom, const CBlockIndex* pprev, const Consensus::Params& chainparams) { 1166+uint32_t GetFetchFlags(CNode* pfrom) {
laanwj commented at 5:33 pm on May 2, 2017:Any idea why these were being passed? Looked back in history and to me it seems thatCBlockIndex* pprev, const Consensus::Params& chainparams
were never used at all, since introduced in b8a97498df1e83f8dcc49bc3fa4344f9e9799242. @sipa @NicolasDorier maybe?
NicolasDorier commented at 6:59 am on May 3, 2017:BeforeGetFetchFlags
was usingIsWitnessEnabled
, notfHaveWitness
andGetLocalServices
paveljanik commented at 5:59 pm on May 2, 2017: contributorsuper-micro nit: can you please correct the function name in the commit message?sipa commented at 7:06 am on May 3, 2017: memberYeah, in older versions of the SegWit patch, fetch flags were based on the chain instead of explicit announcements. That led to too many edge cases to deal with, however. The dependency on pprev/params can safely go away.NicolasDorier commented at 9:35 am on May 3, 2017: contributorutACKlaanwj commented at 9:44 am on May 3, 2017: member@sipa @NicolasDorier thanks for the explanation, so this change makes sense in that context utACK 1ff2bb4laanwj merged this on May 3, 2017laanwj closed this on May 3, 2017
laanwj referenced this in commit 22d870016e on May 3, 2017MarcoFalke 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: 2025-10-07 18:13 UTC
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: 2025-10-07 18:13 UTC
This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me
More mirrored repositories can be found on mirror.b10c.me