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
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
1033 | @@ -1034,7 +1034,8 @@ void CWalletTx::GetAmounts(list<COutputEntry>& listReceived, 1034 | 1035 | // In either case, we need to get the destination address 1036 | CTxDestination address; 1037 | - if (!ExtractDestination(txout.scriptPubKey, address)) 1038 | + 1039 | + if (!ExtractDestination(txout.scriptPubKey, address) && txout.scriptPubKey[0] != OP_RETURN)
Instead of checking txout.scriptPubKey[0] you should probably use CScript::IsUnspendable().
Concept ACK.
updated code to use CScript::IsUnspendable()
utACK
utACK