aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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.