net: Add fRelayTxes flag

Add a fRelayTxes to keep track of the relay transaction flag
we send to other peers.
This commit is contained in:
Wladimir J. van der Laan
2016-05-12 14:00:22 +02:00
committed by lateminer
parent 541225b63a
commit e0de81556a
4 changed files with 6 additions and 3 deletions

View File

@@ -75,6 +75,7 @@ namespace {
bool fDiscover = true;
bool fListen = true;
uint64_t nLocalServices = NODE_NETWORK;
bool fRelayTxes = true;
CCriticalSection cs_mapLocalHost;
map<CNetAddr, LocalServiceInfo> mapLocalHost;
static bool vfReachable[NET_MAX] = {};
@@ -462,7 +463,7 @@ void CNode::PushVersion()
else
LogPrint("net", "send version message: version %d, blocks=%d, us=%s, peer=%d\n", PROTOCOL_VERSION, nBestHeight, addrMe.ToString(), id);
PushMessage(NetMsgType::VERSION, PROTOCOL_VERSION, nLocalServices, nTime, addrYou, addrMe,
nLocalHostNonce, strSubVersion, nBestHeight, !GetBoolArg("-blocksonly", DEFAULT_BLOCKSONLY));
nLocalHostNonce, strSubVersion, nBestHeight, fRelayTxes);
}