| 650 | } |
| 651 | |
| 652 | void CWallet::AddToSpends(const COutPoint& outpoint, const uint256& wtxid, WalletBatch* batch) |
| 653 | { |
| 654 | mapTxSpends.insert(std::make_pair(outpoint, wtxid)); |
| 655 | |
| 656 | if (batch) { |
| 657 | UnlockCoin(outpoint, batch); |
| 658 | } else { |
| 659 | WalletBatch temp_batch(GetDatabase()); |
| 660 | UnlockCoin(outpoint, &temp_batch); |
| 661 | } |
| 662 | |
| 663 | std::pair<TxSpends::iterator, TxSpends::iterator> range; |
| 664 | range = mapTxSpends.equal_range(outpoint); |
| 665 | SyncMetaData(range); |
| 666 | } |
| 667 | |
| 668 | |
| 669 | void CWallet::AddToSpends(const uint256& wtxid, WalletBatch* batch) |
nothing calls this directly
no test coverage detected