Browse Source

wallet: check if tx scriptPubKey is unspendable

0.13
accraze 9 years ago
parent
commit
c611acc38a
  1. 2
      src/wallet/wallet.cpp

2
src/wallet/wallet.cpp

@ -1035,7 +1035,7 @@ void CWalletTx::GetAmounts(list<COutputEntry>& listReceived,
// In either case, we need to get the destination address // In either case, we need to get the destination address
CTxDestination address; CTxDestination address;
if (!ExtractDestination(txout.scriptPubKey, address) && txout.scriptPubKey[0] != OP_RETURN) if (!ExtractDestination(txout.scriptPubKey, address) && txout.scriptPubKey.IsUnspendable())
{ {
LogPrintf("CWalletTx::GetAmounts: Unknown transaction type found, txid %s\n", LogPrintf("CWalletTx::GetAmounts: Unknown transaction type found, txid %s\n",
this->GetHash().ToString()); this->GetHash().ToString());

Loading…
Cancel
Save