aboutsummaryrefslogtreecommitdiff
path: root/src/main.h
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2011-05-11 16:48:51 -0400
committerJeff Garzik <jgarzik@pobox.com>2011-05-11 16:48:51 -0400
commita630da64003ba1831006316a5f27b8a25b788ca2 (patch)
tree44352034a85da48a49ec73a6ff2b94d31ba07222 /src/main.h
parent04a667b0767a6c3fff8d24be784ccaec9edf712b (diff)
Replace CENT with new constant MIN_TX_FEE, where appropriate.
MIN_TX_FEE==CENT remains true (until next commit).
Diffstat (limited to 'src/main.h')
-rw-r--r--src/main.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/main.h b/src/main.h
index 8ff105124e..a575f763a7 100644
--- a/src/main.h
+++ b/src/main.h
@@ -19,6 +19,7 @@ static const unsigned int MAX_BLOCK_SIZE_GEN = MAX_BLOCK_SIZE/2;
static const int MAX_BLOCK_SIGOPS = MAX_BLOCK_SIZE/50;
static const int64 COIN = 100000000;
static const int64 CENT = 1000000;
+static const int64 MIN_TX_FEE = CENT;
static const int64 MAX_MONEY = 21000000 * COIN;
inline bool MoneyRange(int64 nValue) { return (nValue >= 0 && nValue <= MAX_MONEY); }
static const int COINBASE_MATURITY = 100;
@@ -593,7 +594,7 @@ public:
// Base fee is 1 cent per kilobyte
unsigned int nBytes = ::GetSerializeSize(*this, SER_NETWORK);
unsigned int nNewBlockSize = nBlockSize + nBytes;
- int64 nMinFee = (1 + (int64)nBytes / 1000) * CENT;
+ int64 nMinFee = (1 + (int64)nBytes / 1000) * MIN_TX_FEE;
if (fAllowFree)
{
@@ -612,11 +613,11 @@ public:
}
}
- // To limit dust spam, require a 0.01 fee if any output is less than 0.01
- if (nMinFee < CENT)
+ // To limit dust spam, require MIN_TX_FEE if any output is less than 0.01
+ if (nMinFee < MIN_TX_FEE)
foreach(const CTxOut& txout, vout)
if (txout.nValue < CENT)
- nMinFee = CENT;
+ nMinFee = MIN_TX_FEE;
// Raise the price as the block approaches full
if (nBlockSize != 1 && nNewBlockSize >= MAX_BLOCK_SIZE_GEN/2)