aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMax K <[email protected]>2019-11-03 19:42:47 +0100
committerGitHub <[email protected]>2019-11-03 19:42:47 +0100
commitd5d4388a16785ecadfdbb37005b694e6dbdfba75 (patch)
tree5858563be4766088ece14d9d1f2e1b509c1e2dea /src
parentMerge pull request #1601 from langerhans/1.14-supermajority-rpc (diff)
parentFix dust threshold at 1 DOGE (diff)
downloaddiscoin-d5d4388a16785ecadfdbb37005b694e6dbdfba75.tar.xz
discoin-d5d4388a16785ecadfdbb37005b694e6dbdfba75.zip
Merge pull request #1615 from rnicoll/1.14/dust-fees
Correct dust and change
Diffstat (limited to 'src')
-rw-r--r--src/dogecoin.cpp3
-rw-r--r--src/primitives/transaction.h5
-rw-r--r--src/wallet/wallet.h4
3 files changed, 8 insertions, 4 deletions
diff --git a/src/dogecoin.cpp b/src/dogecoin.cpp
index 3f06e8a49..5336d625b 100644
--- a/src/dogecoin.cpp
+++ b/src/dogecoin.cpp
@@ -181,8 +181,7 @@ CAmount GetDogecoinDustFee(const std::vector<CTxOut> &vout, CFeeRate &baseFeeRat
// 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.nValue < COIN)
+ if (txout.IsDust(::minRelayTxFee))
nFee += baseFeeRate.GetFeePerK();
return nFee;
diff --git a/src/primitives/transaction.h b/src/primitives/transaction.h
index ceb8f6ace..5d9869dcb 100644
--- a/src/primitives/transaction.h
+++ b/src/primitives/transaction.h
@@ -178,6 +178,7 @@ public:
if (scriptPubKey.IsUnspendable())
return 0;
+ /*
size_t nSize = GetSerializeSize(*this, SER_DISK, 0);
int witnessversion = 0;
std::vector<unsigned char> witnessprogram;
@@ -191,6 +192,10 @@ public:
}
return 3 * minRelayTxFee.GetFee(nSize);
+ */
+
+ // Dogecoin: Anything below 1 DOGE is always dust
+ return COIN;
}
bool IsDust(const CFeeRate &minRelayTxFee) const
diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h
index 5f77a31ea..09a18f520 100644
--- a/src/wallet/wallet.h
+++ b/src/wallet/wallet.h
@@ -53,9 +53,9 @@ static const CAmount DEFAULT_TRANSACTION_MINFEE = COIN;
//! minimum recommended increment for BIP 125 replacement txs
static const CAmount WALLET_INCREMENTAL_RELAY_FEE = COIN * 5;
//! target minimum change amount
-static const CAmount MIN_CHANGE = CENT;
+static const CAmount MIN_CHANGE = COIN;
//! final minimum change amount after paying for fees
-static const CAmount MIN_FINAL_CHANGE = MIN_CHANGE/2;
+static const CAmount MIN_FINAL_CHANGE = COIN;
//! Default for -spendzeroconfchange
static const bool DEFAULT_SPEND_ZEROCONF_CHANGE = true;
//! Default for -sendfreetransactions