aboutsummaryrefslogtreecommitdiff
path: root/src/dogecoin.cpp
diff options
context:
space:
mode:
authorRoss Nicoll <[email protected]>2018-01-10 08:43:05 +0000
committerRoss Nicoll <[email protected]>2018-09-19 21:09:16 +0100
commit3d363eccd436df49bcdfccf01bcd5148ba3cfb87 (patch)
tree1f045afcb027093b6261f5e2ddd179664fd13d64 /src/dogecoin.cpp
parentAlways use parameters at block 0 to get genesis block hash (#1416) (diff)
downloaddiscoin-3d363eccd436df49bcdfccf01bcd5148ba3cfb87.tar.xz
discoin-3d363eccd436df49bcdfccf01bcd5148ba3cfb87.zip
Bring 1.14 fees in line with 1.10 (#1425)
* Disable free transactions * Updating remaining fee calculation constants * Round up to the nearest 1k, not up 1k so the UI fee estimator is correct
Diffstat (limited to 'src/dogecoin.cpp')
-rw-r--r--src/dogecoin.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/dogecoin.cpp b/src/dogecoin.cpp
index b34437ca0..3e57791fd 100644
--- a/src/dogecoin.cpp
+++ b/src/dogecoin.cpp
@@ -146,6 +146,17 @@ CAmount GetDogecoinBlockSubsidy(int nHeight, const Consensus::Params& consensusP
}
}
+unsigned int GetDogecoinTxSize(const unsigned int nTxBytes)
+{
+ // Dogecoin: Round TX bytes up to the next 1,000 bytes
+ unsigned int nMod = nTxBytes % 1000;
+ if (nMod > 0) {
+ return nTxBytes + 1000 - nMod;
+ } else {
+ return nTxBytes;
+ }
+}
+
CAmount GetDogecoinMinRelayFee(const CTransaction& tx, unsigned int nBytes, bool fAllowFree)
{
{
@@ -179,9 +190,10 @@ CAmount GetDogecoinMinRelayFee(const CTransaction& tx, unsigned int nBytes, bool
CAmount GetDogecoinDustFee(const std::vector<CTxOut> &vout, CFeeRate &baseFeeRate) {
CAmount nFee = 0;
- // To limit dust spam, add base fee for each output less than DUST_SOFT_LIMIT
+ // To limit dust spam, add base fee for each output less than a COIN
BOOST_FOREACH(const CTxOut& txout, vout)
- if (txout.IsDust(::minRelayTxFee))
+ // if (txout.IsDust(::minRelayTxFee))
+ if (txout.nValue < COIN)
nFee += baseFeeRate.GetFeePerK();
return nFee;