Skip to content

Commit

Permalink
Specify non-standard transaction error when it's dust
Browse files Browse the repository at this point in the history
Signed-off-by: Anthony Fieroni <[email protected]>
  • Loading branch information
bvbfan authored and kaykurokawa committed Sep 5, 2018
1 parent 72cbc49 commit ebeb2bd
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1034,8 +1034,12 @@ bool AcceptToMemoryPoolWorker(CTxMemPool& pool, CValidationState& state, const C

// Rather not work on nonstandard transactions (unless -testnet/-regtest)
string reason;
if (fRequireStandard && !IsStandardTx(tx, reason))
return state.DoS(0, false, REJECT_NONSTANDARD, reason);
if (fRequireStandard && !IsStandardTx(tx, reason)) {
if (reason == "dust")
return state.DoS(0, false, REJECT_DUST, reason);
else
return state.DoS(0, false, REJECT_NONSTANDARD, reason);
}

// Don't relay version 2 transactions until CSV is active, and we can be
// sure that such transactions will be mined (unless we're on
Expand Down

0 comments on commit ebeb2bd

Please sign in to comment.