Skip to content

Commit

Permalink
issue btcz#71
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcelusCH committed Oct 19, 2022
1 parent 412449c commit 6f7b6a2
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
15 changes: 13 additions & 2 deletions src/wallet/wallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2478,9 +2478,20 @@ void CWalletTx::GetAmounts(list<COutputEntry>& 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<CTxDestination> 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());
Expand Down

0 comments on commit 6f7b6a2

Please sign in to comment.