diff options
author | dergoegge <n.goeggi@gmail.com> | 2023-10-11 14:53:04 +0100 |
---|---|---|
committer | dergoegge <n.goeggi@gmail.com> | 2023-11-21 13:15:44 +0000 |
commit | 9e58c5bcd96e7ff2062274868814ccae0626589e (patch) | |
tree | b5aa7606931ec3cac2a5e3ce40421562c8fa48f8 /src/wallet/receive.cpp | |
parent | d752349029ec7a76f1fd440db2ec2e458d0f3c99 (diff) | |
download | bitcoin-9e58c5bcd96e7ff2062274868814ccae0626589e.tar.xz |
Use Txid in COutpoint
Diffstat (limited to 'src/wallet/receive.cpp')
-rw-r--r-- | src/wallet/receive.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wallet/receive.cpp b/src/wallet/receive.cpp index 0a75bb6d92..b9d8d9abc9 100644 --- a/src/wallet/receive.cpp +++ b/src/wallet/receive.cpp @@ -173,7 +173,7 @@ CAmount CachedTxGetAvailableCredit(const CWallet& wallet, const CWalletTx& wtx, bool allow_used_addresses = (filter & ISMINE_USED) || !wallet.IsWalletFlagSet(WALLET_FLAG_AVOID_REUSE); CAmount nCredit = 0; - uint256 hashTx = wtx.GetHash(); + Txid hashTx = wtx.GetHash(); for (unsigned int i = 0; i < wtx.tx->vout.size(); i++) { const CTxOut& txout = wtx.tx->vout[i]; if (!wallet.IsSpent(COutPoint(hashTx, i)) && (allow_used_addresses || !wallet.IsSpentKey(txout.scriptPubKey))) { @@ -348,7 +348,7 @@ std::map<CTxDestination, CAmount> GetAddressBalances(const CWallet& wallet) if(!ExtractDestination(output.scriptPubKey, addr)) continue; - CAmount n = wallet.IsSpent(COutPoint(walletEntry.first, i)) ? 0 : output.nValue; + CAmount n = wallet.IsSpent(COutPoint(Txid::FromUint256(walletEntry.first), i)) ? 0 : output.nValue; balances[addr] += n; } } |