From 60cddb37def60d6c68ecf37c7b64e71eaec55ae8 Mon Sep 17 00:00:00 2001 From: BlackcoinDev Date: Mon, 23 Sep 2024 11:28:22 +0200 Subject: [PATCH] trivial: Allow non-standard type with empty scriptPubKey --- src/addresstype.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/addresstype.cpp b/src/addresstype.cpp index 3f7b3c6527..cc45d9ba56 100644 --- a/src/addresstype.cpp +++ b/src/addresstype.cpp @@ -105,8 +105,14 @@ bool ExtractDestination(const CScript& scriptPubKey, CTxDestination& addressRet) } case TxoutType::MULTISIG: case TxoutType::NULL_DATA: - case TxoutType::NONSTANDARD: + case TxoutType::NONSTANDARD: { addressRet = CNoDestination(scriptPubKey); + + // Blackcoin: Allow non-standard type with empty scriptPubKey + if (scriptPubKey.empty()) { + return true; + } + return false; } // no default case, so the compiler can warn about missing cases assert(false);