File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change 99#include < wallet/wallet.h>
1010
1111namespace wallet {
12- isminetype InputIsMine (const CWallet& wallet, const CTxIn & txin)
12+ isminetype InputIsMine (const CWallet& wallet, const CTxIn& txin)
1313{
1414 AssertLockHeld (wallet.cs_wallet );
15- std::map<uint256, CWalletTx>::const_iterator mi = wallet.mapWallet .find (txin.prevout .hash );
16- if (mi != wallet.mapWallet .end ())
17- {
18- const CWalletTx& prev = (*mi).second ;
19- if (txin.prevout .n < prev.tx ->vout .size ())
20- return wallet.IsMine (prev.tx ->vout [txin.prevout .n ]);
15+ const CWalletTx* prev = wallet.GetWalletTx (txin.prevout .hash );
16+ if (prev && txin.prevout .n < prev->tx ->vout .size ()) {
17+ return wallet.IsMine (prev->tx ->vout [txin.prevout .n ]);
2118 }
2219 return ISMINE_NO;
2320}
You can’t perform that action at this time.
0 commit comments