Merge #9268: Fix rounding privacy leak introduced in #9260

9b9324e Fix rounding privacy leak introduced in #9260 (Matt Corallo)
This commit is contained in:
Pieter Wuille 2016-12-06 13:28:10 -08:00
commit 09c4fd157c
No known key found for this signature in database
GPG Key ID: DBA1A67379A1A931

View File

@ -2995,7 +2995,8 @@ bool SendMessages(CNode* pto, CConnman& connman)
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();
if (timeNow > pto->nextSendTimeFeeFilter) { if (timeNow > pto->nextSendTimeFeeFilter) {
static FeeFilterRounder filterRounder(::minRelayTxFee); static CFeeRate default_feerate(DEFAULT_MIN_RELAY_TX_FEE);
static FeeFilterRounder filterRounder(default_feerate);
CAmount filterToSend = filterRounder.round(currentFilter); CAmount filterToSend = filterRounder.round(currentFilter);
if (filterToSend != pto->lastSentFeeFilter) { if (filterToSend != pto->lastSentFeeFilter) {
connman.PushMessage(pto, msgMaker.Make(NetMsgType::FEEFILTER, filterToSend)); connman.PushMessage(pto, msgMaker.Make(NetMsgType::FEEFILTER, filterToSend));