From 743a5f437feab5bd020a03a1e501338c80c55817 Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Fri, 6 Mar 2020 12:03:57 +1300 Subject: [PATCH] Use DoS level constants and parameters for ZIP 213 rejections --- src/main.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index f2dae439a..042589302 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -893,8 +893,10 @@ bool ContextualCheckTransaction( if (tx.IsCoinBase()) { // A coinbase transaction cannot have output descriptions if (tx.vShieldedOutput.size() > 0) - return state.DoS(100, error("CheckTransaction(): coinbase has output descriptions"), - REJECT_INVALID, "bad-cb-has-output-description"); + return state.DoS( + dosLevelPotentiallyRelaxing, + error("CheckTransaction(): coinbase has output descriptions"), + REJECT_INVALID, "bad-cb-has-output-description"); } } @@ -910,7 +912,7 @@ bool ContextualCheckTransaction( output.outCiphertext, ovk, output.cv, output.cmu, output.ephemeralKey); if (!outPlaintext) { return state.DoS( - 100, + DOS_LEVEL_BLOCK, error("CheckTransaction(): coinbase output description has invalid outCiphertext"), REJECT_INVALID, "bad-cb-output-desc-invalid-outct"); @@ -925,7 +927,7 @@ bool ContextualCheckTransaction( output.cmu) ) { return state.DoS( - 100, + DOS_LEVEL_BLOCK, error("CheckTransaction(): coinbase output description has invalid encCiphertext"), REJECT_INVALID, "bad-cb-output-desc-invalid-encct");