diff --git a/src/rpc/mining.cpp b/src/rpc/mining.cpp index 7726d250994..47a5bce22bb 100644 --- a/src/rpc/mining.cpp +++ b/src/rpc/mining.cpp @@ -1024,9 +1024,6 @@ static RPCHelpMan submitblock() if (pindex->IsValid(BLOCK_VALID_SCRIPTS)) { return "duplicate"; } - if (pindex->nStatus & BLOCK_FAILED_MASK) { - return "duplicate-invalid"; - } } } diff --git a/src/validation.cpp b/src/validation.cpp index 226f344d92f..37a4f55ca6b 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -4285,7 +4285,7 @@ bool ChainstateManager::AcceptBlockHeader(const CBlockHeader& block, BlockValida *ppindex = pindex; if (pindex->nStatus & BLOCK_FAILED_MASK) { LogDebug(BCLog::VALIDATION, "%s: block %s is marked invalid\n", __func__, hash.ToString()); - return state.Invalid(BlockValidationResult::BLOCK_CACHED_INVALID, "duplicate"); + return state.Invalid(BlockValidationResult::BLOCK_CACHED_INVALID, "duplicate-invalid"); } return true; }