dogecoin/src/dogecoin-fees.h
Patrick Lodder 7739221064
fees: Require dust limit as dust penalty
Changes the dust policy to require transactions to add the dust
limit itself rather than the relay or wallet fee to the fees paid
when creating dust outputs.

This both disincentivizes dust outputs the same as before when dust
and minumum fee were equal and greatly simplifies the rule, as it
no longer requires 2 variables to calculate dust, but just one:

"If an output is under x, add x to the fee."
2021-10-12 02:47:23 +02:00

34 lines
942 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);
#endif // BITCOIN_DOGECOIN_FEES_H