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

Method updateScript

tools/parser/parser_index.hpp:54–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52
53 template<typename EquivType>
54 void updateScript(std::true_type, EquivType type, const blocksci::State &state, const blocksci::ScriptAccess &scripts) {
55 auto typeIndex = static_cast<size_t>(type);
56 auto progress = blocksci::makeProgressBar(state.scriptCounts[typeIndex] - latestState.scriptCounts[typeIndex], [=]() {});
57 uint32_t num = 0;
58 std::cout << "Updating index with scripts of type " << dedupAddressName(type) << "\n";
59 for (uint32_t i = latestState.scriptCounts[typeIndex]; i < state.scriptCounts[typeIndex]; i++) {
60 static_cast<T*>(this)->template processScript<type>(i + 1, scripts);
61 progress.update(num);
62 num++;
63 }
64 }
65
66 template<typename EquivType>
67 void updateScript(std::false_type, EquivType, const blocksci::State &, const blocksci::ScriptAccess &) {}

Callers 1

operator()Method · 0.80

Calls 3

makeProgressBarFunction · 0.85
dedupAddressNameFunction · 0.85
updateMethod · 0.45

Tested by

no test coverage detected