| 1009 | } |
| 1010 | |
| 1011 | void CWallet::SetSpentKeyState(WalletBatch& batch, const Txid& hash, unsigned int n, bool used, std::set<CTxDestination>& tx_destinations) |
| 1012 | { |
| 1013 | AssertLockHeld(cs_wallet); |
| 1014 | const CWalletTx* srctx = GetWalletTx(hash); |
| 1015 | if (!srctx) return; |
| 1016 | |
| 1017 | CTxDestination dst; |
| 1018 | if (ExtractDestination(srctx->tx->vout[n].scriptPubKey, dst)) { |
| 1019 | if (IsMine(dst)) { |
| 1020 | if (used != IsAddressPreviouslySpent(dst)) { |
| 1021 | if (used) { |
| 1022 | tx_destinations.insert(dst); |
| 1023 | } |
| 1024 | SetAddressPreviouslySpent(batch, dst, used); |
| 1025 | } |
| 1026 | } |
| 1027 | } |
| 1028 | } |
| 1029 | |
| 1030 | bool CWallet::IsSpentKey(const CScript& scriptPubKey) const |
| 1031 | { |
nothing calls this directly
no test coverage detected