diff options
author | Matt Corallo <git@bluematt.me> | 2012-08-20 21:10:25 -0400 |
---|---|---|
committer | Matt Corallo <git@bluematt.me> | 2013-01-16 12:48:02 -0500 |
commit | 4c8fc1a5885634c3b463d5d44337d81cc5b1456b (patch) | |
tree | afd148bb61784fc11a2e12bac84b46a99d887063 /src/net.h | |
parent | b02ddbedcba4f9d86b1aabeb71fe18ec03f9a41a (diff) |
Let a node opt out of tx invs before we get a their bloom filter
Note that the default value for fRelayTxes is false, meaning we
now no longer relay tx inv messages before receiving the remote
peer's version message.
Diffstat (limited to 'src/net.h')
-rw-r--r-- | src/net.h | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -152,6 +152,11 @@ public: bool fNetworkNode; bool fSuccessfullyConnected; bool fDisconnect; + // We use fRelayTxes for two purposes - + // a) it allows us to not relay tx invs before receiving the peer's version message + // b) the peer may tell us in their version message that we should not relay tx invs + // until they have initialized their bloom filter. + bool fRelayTxes; CSemaphoreGrant grantOutbound; CCriticalSection cs_filter; CBloomFilter* pfilter; @@ -211,6 +216,7 @@ public: nStartingHeight = -1; fGetAddr = false; nMisbehavior = 0; + fRelayTxes = false; setInventoryKnown.max_size(SendBufferSize() / 1000); pfilter = NULL; |