Skip to content

Conversation

@sipa
Copy link
Member

@sipa sipa commented May 26, 2016

#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...

@sipa
Copy link
Member Author

sipa commented May 26, 2016

I'll work on a better test for this, but I propose merging quickly, as relay of transactions is currently broken in master.

@theuni
Copy link
Member

theuni commented May 26, 2016

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.

@sipa sipa merged commit 52b02ec into bitcoin:master May 26, 2016
sipa added a commit that referenced this pull request May 26, 2016
…ion send

52b02ec Use global ::fRelayTxes instead of CNode one (Pieter Wuille)
@laanwj
Copy link
Member

laanwj commented May 26, 2016

Good catch!

@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants