aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@exmulti.com>2011-05-11 18:16:36 -0700
committerJeff Garzik <jgarzik@exmulti.com>2011-05-11 18:16:36 -0700
commit4b2e21e7eec875a3e1ff898c50f3b8d4d57bae58 (patch)
tree45ca3fe2689303d34fa7fbad91697e72a8cc43f0 /src
parent04a667b0767a6c3fff8d24be784ccaec9edf712b (diff)
parent2a2487514a818a5de43c99e149efae991d300ed9 (diff)
Merge pull request #218 from jgarzik/fee-update
Update TX fee to 0.0005 BTC
Diffstat (limited to 'src')
-rw-r--r--src/main.cpp2
-rw-r--r--src/main.h9
-rw-r--r--src/ui.cpp2
3 files changed, 7 insertions, 6 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 2cdde5b42b..8d7640f640 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -741,7 +741,7 @@ bool CTransaction::AcceptToMemoryPool(CTxDB& txdb, bool fCheckInputs, bool* pfMi
// Continuously rate-limit free transactions
// This mitigates 'penny-flooding' -- sending thousands of free transactions just to
// be annoying or make other's transactions take longer to confirm.
- if (nFees < CENT)
+ if (nFees < MIN_TX_FEE)
{
static CCriticalSection cs;
static double dFreeCount;
diff --git a/src/main.h b/src/main.h
index 8ff105124e..d1201e6492 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 = 50000;
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)
diff --git a/src/ui.cpp b/src/ui.cpp
index f2bdd49d55..962a268f39 100644
--- a/src/ui.cpp
+++ b/src/ui.cpp
@@ -196,7 +196,7 @@ int ThreadSafeMessageBox(const string& message, const string& caption, int style
bool ThreadSafeAskFee(int64 nFeeRequired, const string& strCaption, wxWindow* parent)
{
- if (nFeeRequired < CENT || nFeeRequired <= nTransactionFee || fDaemon)
+ if (nFeeRequired < MIN_TX_FEE || nFeeRequired <= nTransactionFee || fDaemon)
return true;
string strMessage = strprintf(
_("This transaction is over the size limit. You can still send it for a fee of %s, "