aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/receive.cpp
diff options
context:
space:
mode:
authordergoegge <n.goeggi@gmail.com>2023-10-11 14:53:04 +0100
committerdergoegge <n.goeggi@gmail.com>2023-11-21 13:15:44 +0000
commit9e58c5bcd96e7ff2062274868814ccae0626589e (patch)
treeb5aa7606931ec3cac2a5e3ce40421562c8fa48f8 /src/wallet/receive.cpp
parentd752349029ec7a76f1fd440db2ec2e458d0f3c99 (diff)
downloadbitcoin-9e58c5bcd96e7ff2062274868814ccae0626589e.tar.xz
Use Txid in COutpoint
Diffstat (limited to 'src/wallet/receive.cpp')
-rw-r--r--src/wallet/receive.cpp4
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;
}
}