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 {
15431543// and a not-"is mine" (according to the filter) input.
15441544CAmount CWallet::GetDebit (const CTxIn &txin, const isminefilter& filter) const
15451545{
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 ;
15561550 }
15571551 return 0 ;
15581552}
You can’t perform that action at this time.
0 commit comments