Skip to content

Commit

Permalink
trivial: Allow non-standard type with empty scriptPubKey
Browse files Browse the repository at this point in the history
  • Loading branch information
BlackcoinDev committed Sep 23, 2024
1 parent c9d1c22 commit 48424b9
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/addresstype.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 48424b9

Please sign in to comment.