Skip to content

Commit 06c6a58

Browse files
accrazelaanwj
authored andcommitted
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
1 parent f43c2f9 commit 06c6a58

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎src/wallet/wallet.cpp‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1034,7 +1034,8 @@ void CWalletTx::GetAmounts(list<COutputEntry>& listReceived,
10341034

10351035
// In either case, we need to get the destination address
10361036
CTxDestination address;
1037-
if (!ExtractDestination(txout.scriptPubKey, address))
1037+
1038+
if (!ExtractDestination(txout.scriptPubKey, address) && !txout.scriptPubKey.IsUnspendable())
10381039
{
10391040
LogPrintf("CWalletTx::GetAmounts: Unknown transaction type found, txid %s\n",
10401041
this->GetHash().ToString());

0 commit comments

Comments
 (0)