mirror of
https://github.com/dashpay/dash.git
synced 2024-12-29 13:59:06 +01:00
Litecoin: IsDust() detection disabled, allows any valid dust to be relayed. The fees imposed on each dust txo is considered sufficient spam deterrant.
This commit is contained in:
parent
bb88edbd0f
commit
0d1d058451
12
src/main.cpp
12
src/main.cpp
@ -362,15 +362,9 @@ unsigned int LimitOrphanTxSize(unsigned int nMaxOrphans)
|
||||
|
||||
bool CTxOut::IsDust() const
|
||||
{
|
||||
// "Dust" is defined in terms of CTransaction::nMinRelayTxFee,
|
||||
// which has units satoshis-per-kilobyte.
|
||||
// If you'd pay more than 1/3 in fees
|
||||
// to spend something, then we consider it dust.
|
||||
// A typical txout is 33 bytes big, and will
|
||||
// need a CTxIn of at least 148 bytes to spend,
|
||||
// so dust is a txout less than 54 uBTC
|
||||
// (5430 satoshis) with default nMinRelayTxFee
|
||||
return ((nValue*1000)/(3*((int)GetSerializeSize(SER_DISK,0)+148)) < CTransaction::nMinRelayTxFee);
|
||||
// Litecoin: IsDust() detection disabled, allows any valid dust to be relayed.
|
||||
// The fees imposed on each dust txo is considered sufficient spam deterrant.
|
||||
return false;
|
||||
}
|
||||
|
||||
bool CTransaction::IsStandard() const
|
||||
|
@ -263,7 +263,8 @@ BOOST_AUTO_TEST_CASE(test_IsStandard)
|
||||
BOOST_CHECK(t.IsStandard());
|
||||
|
||||
t.vout[0].nValue = 5011; // dust
|
||||
BOOST_CHECK(!t.IsStandard());
|
||||
// Litecoin does not enforce isDust(). Per dust fees are considered sufficient as deterrant.
|
||||
// BOOST_CHECK(!t.IsStandard());
|
||||
|
||||
t.vout[0].nValue = 6011; // not dust
|
||||
BOOST_CHECK(t.IsStandard());
|
||||
|
Loading…
Reference in New Issue
Block a user