Permalink
Browse files

Checks for null data transaction before issuing error to debug.log

CWalletTx::GetAmounts could not find output address for null data transactions, thus issuing an error in debug.log. This change checks to see if the transaction is OP_RETURN before issuing error.

resolves #6142

Github-Pull: #7200
Rebased-From: b6915b8 c611acc d812daf
  • Loading branch information...
accraze authored and laanwj committed Dec 12, 2015
1 parent f43c2f9 commit 06c6a584635bb42c511baf505cebd7cdf77b89e9
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/wallet/wallet.cpp
View
@@ -1034,7 +1034,8 @@ void CWalletTx::GetAmounts(list<COutputEntry>& listReceived,
// In either case, we need to get the destination address
CTxDestination address;
- if (!ExtractDestination(txout.scriptPubKey, address))
+
+ if (!ExtractDestination(txout.scriptPubKey, address) && !txout.scriptPubKey.IsUnspendable())
{
LogPrintf("CWalletTx::GetAmounts: Unknown transaction type found, txid %s\n",
this->GetHash().ToString());

0 comments on commit 06c6a58

Please sign in to comment.