Browse Source

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.
0.10
Gavin Andresen 11 years ago
parent
commit
16b3ff66e0
  1. 9
      src/main.cpp

9
src/main.cpp

@ -753,10 +753,11 @@ int64 GetMinFee(const CTransaction& tx, bool fAllowFree, enum GetMinFee_mode mod
{ {
// There is a free transaction area in blocks created by most miners, // 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 // * If we are relaying we allow transactions up to DEFAULT_BLOCK_PRIORITY_SIZE - 1000
// to be considered to fall into this category // to be considered to fall into this category. We don't want to encourage sending
// * If we are creating a transaction we allow transactions up to DEFAULT_BLOCK_PRIORITY_SIZE - 17000 // multiple transactions instead of one big transaction to avoid fees.
// (= 10000) to be considered safe and assume they can likely make it into this section // * If we are creating a transaction we allow transactions up to 1,000 bytes
if (nBytes < (mode == GMF_SEND ? (DEFAULT_BLOCK_PRIORITY_SIZE - 17000) : (DEFAULT_BLOCK_PRIORITY_SIZE - 1000))) // 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; nMinFee = 0;
} }

Loading…
Cancel
Save