From ebeb2bd092734035887ca3d8d0e69628bd2d3900 Mon Sep 17 00:00:00 2001 From: Anthony Fieroni Date: Mon, 6 Aug 2018 09:18:22 +0300 Subject: [PATCH] Specify non-standard transaction error when it's dust Signed-off-by: Anthony Fieroni --- src/main.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index a894999b6..d910d8da8 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -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