Bugfix: use global ::fRelayTxes instead of CNode in version send #8102

pull sipa wants to merge 1 commits into bitcoin:master from sipa:oopsrelay changing 1 files +1 −1
  1. sipa commented at 4:47 pm on May 26, 2016: member

    #8049 changed the calls to GetBoolArg("-blocksonly") to a global boolean fRelayTxes. Inside CNode::PushVersion, fRelayTxes refers to the CNode instance variable with the same name, however, causing the connecting node to always send false here, and never receive any transactions.

    I’ve attempted to add a unit test for this, but we don’t seem to ever test receiving relayed transactions by a connecting node only…

  2. sipa commented at 4:59 pm on May 26, 2016: member
    I’ll work on a better test for this, but I propose merging quickly, as relay of transactions is currently broken in master.
  3. theuni commented at 5:11 pm on May 26, 2016: member

    yikes. utACK.

    As an aside, we should really strive to avoid shadowing vars, and enable -Wshadow.

    Also, as a follow-up, this should probably be renamed fBlocksonly so that it’s more clear what it’s for.

  4. Use global ::fRelayTxes instead of CNode one 52b02ecd6d
  5. sipa force-pushed on May 26, 2016
  6. sipa merged this on May 26, 2016
  7. sipa closed this on May 26, 2016

  8. sipa referenced this in commit 425278d17b on May 26, 2016
  9. laanwj commented at 7:32 pm on May 26, 2016: member
    Good catch!
  10. 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: 2024-09-29 07:12 UTC

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