File tree Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -1543,16 +1543,10 @@ void CWallet::BlockUntilSyncedToCurrentChain() const {
1543
1543
// and a not-"is mine" (according to the filter) input.
1544
1544
CAmount CWallet::GetDebit (const CTxIn &txin, const isminefilter& filter) const
1545
1545
{
1546
- {
1547
- LOCK (cs_wallet);
1548
- const auto mi = mapWallet.find (txin.prevout .hash );
1549
- if (mi != mapWallet.end ())
1550
- {
1551
- const CWalletTx& prev = (*mi).second ;
1552
- if (txin.prevout .n < prev.tx ->vout .size ())
1553
- if (IsMine (prev.tx ->vout [txin.prevout .n ]) & filter)
1554
- return prev.tx ->vout [txin.prevout .n ].nValue ;
1555
- }
1546
+ LOCK (cs_wallet);
1547
+ auto txo = GetTXO (txin.prevout );
1548
+ if (txo && (txo->GetIsMine () & filter)) {
1549
+ return txo->GetTxOut ().nValue ;
1556
1550
}
1557
1551
return 0 ;
1558
1552
}
You can’t perform that action at this time.
0 commit comments