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

Github-Pull: #9117
Rebased-From: 46625538d674a5aaf1bcfa7c8be8a49e5a23fa9e
This commit is contained in:
Cory Fields
2016-11-09 12:45:13 -05:00
committed by Luke Dashjr
parent 5f3a12c97c
commit 6fe3981ac8

View File

@@ -6856,7 +6856,7 @@ bool SendMessages(CNode* pto)
// Message: feefilter
//
// 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))) {
CAmount currentFilter = mempool.GetMinFee(GetArg("-maxmempool", DEFAULT_MAX_MEMPOOL_SIZE) * 1000000).GetFeePerK();
int64_t timeNow = GetTimeMicros();