Changeset View
Changeset View
Standalone View
Standalone View
src/policy/fees.cpp
// Copyright (c) 2009-2010 Satoshi Nakamoto | // Copyright (c) 2009-2010 Satoshi Nakamoto | ||||
// Copyright (c) 2009-2016 The Bitcoin Core developers | // Copyright (c) 2009-2016 The Bitcoin Core developers | ||||
// Copyright (c) 2018 The Bitcoin developers | // Copyright (c) 2018 The Bitcoin developers | ||||
// Distributed under the MIT software license, see the accompanying | // Distributed under the MIT software license, see the accompanying | ||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php. | // file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
#include "policy/fees.h" | #include <amount.h> | ||||
#include "amount.h" | #include <feerate.h> | ||||
#include "feerate.h" | #include <policy/fees.h> | ||||
FeeFilterRounder::FeeFilterRounder(const CFeeRate &minIncrementalFee) { | FeeFilterRounder::FeeFilterRounder(const CFeeRate &minIncrementalFee) { | ||||
Amount minFeeLimit = std::max(SATOSHI, minIncrementalFee.GetFeePerK() / 2); | Amount minFeeLimit = std::max(SATOSHI, minIncrementalFee.GetFeePerK() / 2); | ||||
feeset.insert(Amount::zero()); | feeset.insert(Amount::zero()); | ||||
for (double bucketBoundary = minFeeLimit / SATOSHI; | for (double bucketBoundary = minFeeLimit / SATOSHI; | ||||
bucketBoundary <= double(MAX_FEERATE / SATOSHI); | bucketBoundary <= double(MAX_FEERATE / SATOSHI); | ||||
bucketBoundary *= FEE_SPACING) { | bucketBoundary *= FEE_SPACING) { | ||||
feeset.insert(int64_t(bucketBoundary) * SATOSHI); | feeset.insert(int64_t(bucketBoundary) * SATOSHI); | ||||
Show All 12 Lines |