| 891 | } |
| 892 | |
| 893 | void CWallet::SetSpentKeyState(WalletBatch& batch, const uint256& hash, unsigned int n, bool used, std::set<CTxDestination>& tx_destinations) |
| 894 | { |
| 895 | AssertLockHeld(cs_wallet); |
| 896 | const CWalletTx* srctx = GetWalletTx(hash); |
| 897 | if (!srctx) return; |
| 898 | |
| 899 | CTxDestination dst; |
| 900 | if (ExtractDestination(srctx->tx->vout[n].scriptPubKey, dst)) { |
| 901 | if (IsMine(dst)) { |
| 902 | if (used != IsAddressUsed(dst)) { |
| 903 | if (used) { |
| 904 | tx_destinations.insert(dst); |
| 905 | } |
| 906 | SetAddressUsed(batch, dst, used); |
| 907 | } |
| 908 | } |
| 909 | } |
| 910 | } |
| 911 | |
| 912 | bool CWallet::IsSpentKey(const uint256& hash, unsigned int n) const |
| 913 | { |
nothing calls this directly
no test coverage detected