From 48424b991277825879ddab74d550214d7e3d9170 Mon Sep 17 00:00:00 2001 From: BlackcoinDev Date: Mon, 23 Sep 2024 10:50:00 +0200 Subject: [PATCH] trivial: Allow non-standard type with empty scriptPubKey --- src/addresstype.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/addresstype.cpp b/src/addresstype.cpp index f2dd8ca877..082caff915 100644 --- a/src/addresstype.cpp +++ b/src/addresstype.cpp @@ -106,12 +106,13 @@ bool ExtractDestination(const CScript& scriptPubKey, CTxDestination& addressRet) case TxoutType::MULTISIG: case TxoutType::NULL_DATA: case TxoutType::NONSTANDARD: { - // Blackcoin - Skip NONSTANDARD if scriptPubKey is empty (used in coinstake) - if (whichType == TxoutType::NONSTANDARD && scriptPubKey.empty()) { - return true; // Skip processing for empty scriptPubKey + addressRet = CNoDestination(scriptPubKey); + + // Blackcoin: Allow non-standard type with empty scriptPubKey + if (scriptPubKey.empty()) { + return true; } - addressRet = CNoDestination(scriptPubKey); return false; } } // no default case, so the compiler can warn about missing cases