MCPcopy Create free account
hub / github.com/citp/BlockSci / run

Method run

tools/parser/block_processor.cpp:687–707  ·  view source on GitHub ↗

inputProcessingDone

Source from the content-addressed store, hash-verified

685 }
686 // inputProcessingDone
687 void run() {
688 using namespace std::chrono_literals;
689 // CompletionGuard sets isDone to true in its destructor that is called at the end of this operator() method
690 std::list<CompletionGuard> guards;
691 for (auto &stage : stages) {
692 guards.emplace_back(stage->isDone);
693 }
694
695 // Consume queued items as long as the previous processing step has not finished
696 while (anyNotDone()) {
697 doAll();
698 prevWaitCount++;
699 std::this_thread::sleep_for(5ms);
700 }
701
702 // Last call to consume queued items to catch last items
703 doAll();
704 for (auto &stage : stages) {
705 stage->complete();
706 }
707 }
708};
709
710ProcessStep makeStandardProcessStep(std::unique_ptr<ProcessorStep> && func, const DiscardCheckFunc &advanceFuncFirst, const DiscardCheckFunc &advanceFuncSecond, bool discardIfFullFirst = false, bool discardIfFullSecond = false) {

Callers 5

runMethod · 0.45
addNewBlocksMethod · 0.45
check-integrity.pyFile · 0.45
chainFunction · 0.45
chainFunction · 0.45

Calls 1

completeMethod · 0.45

Tested by 2

chainFunction · 0.36
chainFunction · 0.36