aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGavin Andresen <gavinandresen@gmail.com>2013-09-18 12:04:29 +1000
committerWladimir J. van der Laan <laanwj@gmail.com>2013-11-28 07:59:54 +0100
commit9612e4c0d9730dbdb9971e53c72df17dd97daa2a (patch)
tree114cc7ea2bceb56633e4ce6342f3f3df2495af70
parent1ca8a75cb4d916bf225f2879f2722649f509c92d (diff)
downloadbitcoin-9612e4c0d9730dbdb9971e53c72df17dd97daa2a.tar.xz
Lower maximum size for free transaction creation
Changes the maximum size of a free transaction that will be created from 10,000 bytes to 1,000 bytes. The idea behind this change is to make the free transaction area available to a greater number of people; with the default 27K-per-block, just three very-large very-high-priority transactions could fill the space.
-rw-r--r--src/main.cpp21
1 files changed, 8 insertions, 13 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 52e89acc26..9c7eece56d 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -608,19 +608,14 @@ int64 CTransaction::GetMinFee(unsigned int nBlockSize, bool fAllowFree,
if (fAllowFree)
{
- if (nBlockSize == 1)
- {
- // Transactions under 10K are free
- // (about 4500 BTC if made of 50 BTC inputs)
- if (nBytes < 10000)
- nMinFee = 0;
- }
- else
- {
- // Free transaction area
- if (nNewBlockSize < DEFAULT_BLOCK_PRIORITY_SIZE)
- nMinFee = 0;
- }
+ // 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
+ // to be considered to fall into this category. We don't want to encourage sending
+ // multiple transactions instead of one big transaction to avoid fees.
+ // * If we are creating a transaction we allow transactions up to 1,000 bytes
+ // to be considered safe and assume they can likely make it into this section.
+ if (nBytes < (mode == GMF_SEND ? 1000 : (DEFAULT_BLOCK_PRIORITY_SIZE - 1000)))
+ nMinFee = 0;
}
// This code can be removed after enough miners have upgraded to version 0.9.