vToFetch is never used after declaration within the INV message. When checked if not empty, evaluation is always false. Best case scenario this is optimized by the compiler, worst case it wastes cpu cycles. It should be removed either way.
removed unused code in INV message #10351
pull Greg-Griffith wants to merge 1 commits into bitcoin:master from Greg-Griffith:master changing 1 files +0 −5-
Greg-Griffith commented at 5:56 AM on May 7, 2017: none
-
c707ca872d
removed unused code in INV message
vToFetch is never used after declaration. When checked if not empty, evaluation is always false. Best case scenario this is optimized by the compiler, worst case it wastes cpu cycles. It should be removed either way.
- fanquake added the label P2P on May 7, 2017
-
laanwj commented at 7:46 AM on May 7, 2017: member
Good catch, seems that this has been unused since #8872 / 037159cebf1eae4445050cec029986514ed4e9e2 (Remove block-request logic from INV message processing). utack https://github.com/bitcoin/bitcoin/pull/10351/commits/c707ca872dcce98892431d33c250372da714f15f
-
sipa commented at 6:00 PM on May 7, 2017: member
utACK c707ca872dcce98892431d33c250372da714f15f
-
MarcoFalke commented at 7:20 PM on May 7, 2017: member
utACK c707ca872dcce98892431d33c250372da714f15f
-
paveljanik commented at 7:59 PM on May 7, 2017: contributor
ACK c707ca8
- dcousens approved
- sipa merged this on May 8, 2017
- sipa closed this on May 8, 2017
- sipa referenced this in commit 3f57c55dba on May 8, 2017
- MarcoFalke locked this on Sep 8, 2021
Labels