MCPcopy Create free account
hub / github.com/ElementsProject/elements / AddToSpends

Method AddToSpends

src/wallet/wallet.cpp:652–666  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

650}
651
652void 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
669void CWallet::AddToSpends(const uint256& wtxid, WalletBatch* batch)

Callers

nothing calls this directly

Calls 4

findMethod · 0.80
insertMethod · 0.45
endMethod · 0.45
IsCoinBaseMethod · 0.45

Tested by

no test coverage detected