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 9
9
#include < wallet/wallet.h>
10
10
11
11
namespace wallet {
12
- isminetype InputIsMine (const CWallet& wallet, const CTxIn & txin)
12
+ isminetype InputIsMine (const CWallet& wallet, const CTxIn& txin)
13
13
{
14
14
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 ]);
21
18
}
22
19
return ISMINE_NO;
23
20
}
You can’t perform that action at this time.
0 commit comments