mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-21 15:50:07 +01:00
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.
This commit is contained in:
committed by
Wladimir J. van der Laan
parent
1ca8a75cb4
commit
9612e4c0d9
21
src/main.cpp
21
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.
|
||||
|
||||
Reference in New Issue
Block a user