dogecoin/src/dogecoin-fees.h
Patrick Lodder e83ddb7e8f
fees: Allow dust comparison against a given dust limit
Prepares for having more than one dust limit configured, yet
allowing the same function to return whether or not an output is
dust.

Implements the check with nDustLimit (-dustlimit) for relay related
queries, and - for lack of alternatives - uses the same parameter
for CWallet::GetRequiredFee until a wallet-specific dust limit is
introduced
2021-10-10 20:35:54 +02:00

34 lines
965 B
C++

// Copyright (c) 2021 The Dogecoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef BITCOIN_DOGECOIN_FEES_H
#define BITCOIN_DOGECOIN_FEES_H
#include "amount.h"
#include "chain.h"
#include "chainparams.h"
#ifdef ENABLE_WALLET
enum FeeRatePreset
{
MINIMUM,
MORE,
WOW,
AMAZE,
MANY_GENEROUS,
SUCH_EXPENSIVE
};
/** Estimate fee rate needed to get into the next nBlocks */
CFeeRate GetDogecoinFeeRate(int priority);
const std::string GetDogecoinPriorityLabel(int priority);
CFeeRate GetDogecoinWalletFeeRate();
CAmount GetDogecoinMinWalletFee(unsigned int nBytes_);
#endif // ENABLE_WALLET
CAmount GetDogecoinMinRelayFee(const CTransaction& tx, unsigned int nBytes, bool fAllowFree);
CAmount GetDogecoinDustFee(const std::vector<CTxOut> &vout, const CAmount dustLimit, CFeeRate &baseFeeRate);
#endif // BITCOIN_DOGECOIN_FEES_H