diff options
| author | Gavin Andresen <[email protected]> | 2013-10-19 23:01:47 -0700 |
|---|---|---|
| committer | Gavin Andresen <[email protected]> | 2013-10-19 23:01:47 -0700 |
| commit | d3b0fa1d82d0883f2e18e95b91125dd19659a17a (patch) | |
| tree | b63032e40aacde666251fe4a9fee088de3af2bd5 /src/main.cpp | |
| parent | Merge pull request #3103 from gavinandresen/appbundle (diff) | |
| parent | Lower maximum size for free transaction creation (diff) | |
| download | discoin-d3b0fa1d82d0883f2e18e95b91125dd19659a17a.tar.xz discoin-d3b0fa1d82d0883f2e18e95b91125dd19659a17a.zip | |
Merge pull request #3008 from gavinandresen/CENTrule
Two small free transaction policy changes
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/main.cpp b/src/main.cpp index 215a7ba62..6c2898cff 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -722,15 +722,18 @@ int64 GetMinFee(const CTransaction& tx, bool fAllowFree, enum GetMinFee_mode mod { // 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 - // * If we are creating a transaction we allow transactions up to DEFAULT_BLOCK_PRIORITY_SIZE - 17000 - // (= 10000) to be considered safe and assume they can likely make it into this section - if (nBytes < (mode == GMF_SEND ? (DEFAULT_BLOCK_PRIORITY_SIZE - 17000) : (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; } - // To limit dust spam, require base fee if any output is less than 0.01 - if (nMinFee < nBaseFee) + // This code can be removed after enough miners have upgraded to version 0.9. + // Until then, be safe when sending and require a fee if any output + // is less than CENT: + if (nMinFee < nBaseFee && mode == GMF_SEND) { BOOST_FOREACH(const CTxOut& txout, tx.vout) if (txout.nValue < CENT) |