diff options
author | accraze <accraze@gmail.com> | 2015-12-11 18:07:11 -0800 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2015-12-14 13:10:02 +0100 |
commit | 06c6a584635bb42c511baf505cebd7cdf77b89e9 (patch) | |
tree | 43c2543235d3ffee87f4f046f8c8044e876a652e /src/wallet | |
parent | f43c2f9a8a30760c34dd4691de4ed4d7a7b9969e (diff) | |
download | bitcoin-06c6a584635bb42c511baf505cebd7cdf77b89e9.tar.xz |
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: b6915b82398d2e1d1f888b3816adfaf06d9a450e c611acc38a95d336a824b632823aa1b652e570df d812daf967ba4173bfa1c37eeb4ab7a0ccc4df25
Diffstat (limited to 'src/wallet')
-rw-r--r-- | src/wallet/wallet.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index a262769c4d..06f1b0f450 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.IsUnspendable()) { LogPrintf("CWalletTx::GetAmounts: Unknown transaction type found, txid %s\n", this->GetHash().ToString()); |