MCPcopy Create free account
hub / github.com/bitcoinxt/bitcoinxt / removeIfExists

Method removeIfExists

src/thinblockmanager.cpp:145–155  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

143}
144
145void ThinBlockManager::removeIfExists(const uint256& h) {
146 if (!builders.count(h))
147 return;
148
149 // Take copy. Calling setAvailable causes workers to remove
150 // themself from set (changing it during iteration)
151 std::set<ThinBlockWorker*> workers = builders[h].workers;
152 for (ThinBlockWorker* w : workers)
153 w->stopWork(h);
154 builders.erase(h);
155}
156
157std::vector<std::pair<int, ThinTx> > ThinBlockManager::getTxsMissing(const uint256& hash) const {
158 assert(builders.count(hash));

Callers 1

MarkBlockAsReceivedFunction · 0.80

Calls 3

countMethod · 0.80
stopWorkMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected