diff --git a/src/main.cpp b/src/main.cpp index c812bc79d..c1e72ca53 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1638,7 +1638,8 @@ bool GetSpentIndex(CSpentIndexKey &key, CSpentIndexValue &value) return true; if (!pblocktree->ReadSpentIndex(key, value)) - return error("Unable to get spent index information"); + return false; + //return error("Unable to get spent index information"); return true; } diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index c8f634b5d..99ebb15f9 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -2478,9 +2478,20 @@ void CWalletTx::GetAmounts(list& listReceived, else if (!(fIsMine & filter)) continue; - // In either case, we need to get the destination address CTxDestination address; - if (!ExtractDestination(txout.scriptPubKey, address)) + + // Check if its an OP code. GITHUB ISSUE #71 + vector addresses; + txnouttype typeRet; + int nRequiredRet; + ExtractDestinations(txout.scriptPubKey, typeRet, addresses, nRequiredRet); + if (typeRet == TX_NULL_DATA) + { + address = CNoDestination(); + } + + // In either case, we need to get the destination address + else if (!ExtractDestination(txout.scriptPubKey, address)) { LogPrintf("CWalletTx::GetAmounts: Unknown transaction type found, txid %s\n", this->GetHash().ToString());