Merge #9117: net: don't send feefilter messages before the version handshake is complete

4662553 net: don't send feefilter messages before the version handshake is complete (Cory Fields)
This commit is contained in:
Wladimir J. van der Laan 2016-11-21 11:50:32 +01:00 committed by Alexander Block
parent f12610c030
commit afa99c41fc

View File

@ -2923,7 +2923,7 @@ bool SendMessages(CNode* pto, CConnman& connman, std::atomic<bool>& interruptMsg
// Message: feefilter // Message: feefilter
// //
// We don't want white listed peers to filter txs to us if we have -whitelistforcerelay // We don't want white listed peers to filter txs to us if we have -whitelistforcerelay
if (pto->nVersion >= FEEFILTER_VERSION && GetBoolArg("-feefilter", DEFAULT_FEEFILTER) && if (!pto->fDisconnect && pto->nVersion >= FEEFILTER_VERSION && GetBoolArg("-feefilter", DEFAULT_FEEFILTER) &&
!(pto->fWhitelisted && GetBoolArg("-whitelistforcerelay", DEFAULT_WHITELISTFORCERELAY))) { !(pto->fWhitelisted && GetBoolArg("-whitelistforcerelay", DEFAULT_WHITELISTFORCERELAY))) {
CAmount currentFilter = mempool.GetMinFee(GetArg("-maxmempool", DEFAULT_MAX_MEMPOOL_SIZE) * 1000000).GetFeePerK(); CAmount currentFilter = mempool.GetMinFee(GetArg("-maxmempool", DEFAULT_MAX_MEMPOOL_SIZE) * 1000000).GetFeePerK();
int64_t timeNow = GetTimeMicros(); int64_t timeNow = GetTimeMicros();