aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorRoss Nicoll <[email protected]>2015-06-13 08:19:48 +0000
committerRoss Nicoll <[email protected]>2015-07-31 18:11:06 +0000
commitc81d7632e9dc8741ddb33e7f605f654bf3f9da09 (patch)
treebd3cc11c4f59f3994e7e6e5afba5564ae93012cc /src/main.cpp
parentMerge pull request #1205 from rnicoll/1.10-genesis-checks (diff)
downloaddiscoin-c81d7632e9dc8741ddb33e7f605f654bf3f9da09.tar.xz
discoin-c81d7632e9dc8741ddb33e7f605f654bf3f9da09.zip
Add Dogecoin current fee calculation logic
Introduces 1 COIN/kb fees, rounded up to the next 1 COIN. Disable free transactions Dust outputs incur a 1 COIN additional fee Add unit tests for fee calculation Update existing unit tests with higher transaction values so that transactions are still standard
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/main.cpp b/src/main.cpp
index ded32eb03..e4f30906f 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -66,7 +66,7 @@ uint64_t nPruneTarget = 0;
bool fAlerts = DEFAULT_ALERTS;
/** Fees smaller than this (in satoshi) are considered zero fee (for relaying and mining) */
-CFeeRate minRelayTxFee = CFeeRate(1000);
+CFeeRate minRelayTxFee = CFeeRate(COIN);
CTxMemPool mempool(::minRelayTxFee);
@@ -867,8 +867,10 @@ CAmount GetMinRelayFee(const CTransaction& tx, unsigned int nBytes, bool fAllowF
}
CAmount nMinFee = ::minRelayTxFee.GetFee(nBytes);
+ nMinFee += GetDogecoinDustFee(tx.vout, ::minRelayTxFee);
- if (fAllowFree)
+ // Dogecoin: Disable free transactions
+ /* if (fAllowFree)
{
// There is a free transaction area in blocks created by most miners,
// * If we are relaying we allow transactions up to DEFAULT_BLOCK_PRIORITY_SIZE - 1000
@@ -876,7 +878,7 @@ CAmount GetMinRelayFee(const CTransaction& tx, unsigned int nBytes, bool fAllowF
// multiple transactions instead of one big transaction to avoid fees.
if (nBytes < (DEFAULT_BLOCK_PRIORITY_SIZE - 1000))
nMinFee = 0;
- }
+ } */
if (!MoneyRange(nMinFee))
nMinFee = MAX_MONEY;