Auto merge of #2141 - bitcartel:1969_free_rate_limiter, r=daira

Closes #1969. Large shielded transactions using the default fee are no longer treated as "free" transactions
This commit is contained in:
zkbot
2017-03-02 03:51:14 +00:00
8 changed files with 19 additions and 19 deletions

View File

@@ -61,7 +61,7 @@ static const unsigned int MAX_P2SH_SIGOPS = 15;
/** The maximum number of sigops we're willing to relay/mine in a single tx */
static const unsigned int MAX_STANDARD_TX_SIGOPS = MAX_BLOCK_SIGOPS/5;
/** Default for -minrelaytxfee, minimum relay fee for transactions */
static const unsigned int DEFAULT_MIN_RELAY_TX_FEE = 1000;
static const unsigned int DEFAULT_MIN_RELAY_TX_FEE = 100;
/** Default for -maxorphantx, maximum number of orphan transactions kept in memory */
static const unsigned int DEFAULT_MAX_ORPHAN_TRANSACTIONS = 100;
/** The maximum size of a blk?????.dat file (since 0.8) */

View File

@@ -274,7 +274,7 @@ public:
// to spend something, then we consider it dust.
// A typical txout is 34 bytes big, and will
// need a CTxIn of at least 148 bytes to spend:
// so dust is a txout less than 546 satoshis
// so dust is a txout less than 54 satoshis
// with default minRelayTxFee.
size_t nSize = GetSerializeSize(SER_DISK,0)+148u;
return 3*minRelayTxFee.GetFee(nSize);

View File

@@ -560,7 +560,7 @@ BOOST_AUTO_TEST_CASE(test_IsStandard)
string reason;
BOOST_CHECK(IsStandardTx(t, reason));
t.vout[0].nValue = 501; // dust
t.vout[0].nValue = 53; // dust
BOOST_CHECK(!IsStandardTx(t, reason));
t.vout[0].nValue = 2730; // not dust
@@ -639,7 +639,7 @@ BOOST_AUTO_TEST_CASE(test_IsStandardV2)
BOOST_CHECK(IsStandardTx(t, reason));
// v2 transactions can still be non-standard for the same reasons as v1.
t.vout[0].nValue = 501; // dust
t.vout[0].nValue = 53; // dust
BOOST_CHECK(!IsStandardTx(t, reason));
// v3 is not standard.