aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoraccraze <accraze@gmail.com>2015-12-11 18:07:11 -0800
committeraccraze <accraze@gmail.com>2015-12-11 18:07:11 -0800
commitb6915b82398d2e1d1f888b3816adfaf06d9a450e (patch)
tree90864192295d859ae449c956835d06e6b97bff0a
parent9ee02cf564d1ce79d2981899cb4d38c914210dc7 (diff)
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
-rw-r--r--src/wallet/wallet.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp
index f3911f314a..a45a9367ad 100644
--- a/src/wallet/wallet.cpp
+++ b/src/wallet/wallet.cpp
@@ -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[0] != OP_RETURN)
{
LogPrintf("CWalletTx::GetAmounts: Unknown transaction type found, txid %s\n",
this->GetHash().ToString());