Skip to content

Commit b6915b8

Browse files
committed
checks for null data transaction before 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
1 parent 9ee02cf commit b6915b8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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[0] != OP_RETURN)
10381039
{
10391040
LogPrintf("CWalletTx::GetAmounts: Unknown transaction type found, txid %s\n",
10401041
this->GetHash().ToString());

0 commit comments

Comments
 (0)