diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2015-07-21 11:47:33 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2015-07-21 11:47:57 +0200 |
commit | 24ce77d775f48034ef0c42fa21017d145c790921 (patch) | |
tree | dcc068a3b06264b78c96903efbc4885bf8e02079 /src/primitives/transaction.h | |
parent | 6d6b11e793a2d1a106238a2838f5df1d3124217b (diff) | |
parent | 0aad1f13b2430165062bf9436036c1222a8724da (diff) |
Merge pull request #6444
0aad1f1 Exempt unspendable transaction outputs from dust checks (zathras-crypto)
Diffstat (limited to 'src/primitives/transaction.h')
-rw-r--r-- | src/primitives/transaction.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/primitives/transaction.h b/src/primitives/transaction.h index 6cfd93a9a1..2a457cdae7 100644 --- a/src/primitives/transaction.h +++ b/src/primitives/transaction.h @@ -141,10 +141,13 @@ public: // 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 34 bytes big, and will + // A typical spendable 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 spendable txout less than 546 satoshis // with default minRelayTxFee. + if (scriptPubKey.IsUnspendable()) + return 0; + size_t nSize = GetSerializeSize(SER_DISK,0)+148u; return 3*minRelayTxFee.GetFee(nSize); } |