From c611acc38a95d336a824b632823aa1b652e570df Mon Sep 17 00:00:00 2001 From: accraze Date: Sat, 12 Dec 2015 10:33:37 -0800 Subject: [PATCH] wallet: check if tx scriptPubKey is unspendable --- src/wallet/wallet.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index a45a9367a..82f3b42b5 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -1035,7 +1035,7 @@ void CWalletTx::GetAmounts(list& listReceived, // In either case, we need to get the destination address CTxDestination address; - if (!ExtractDestination(txout.scriptPubKey, address) && txout.scriptPubKey[0] != OP_RETURN) + if (!ExtractDestination(txout.scriptPubKey, address) && txout.scriptPubKey.IsUnspendable()) { LogPrintf("CWalletTx::GetAmounts: Unknown transaction type found, txid %s\n", this->GetHash().ToString());