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

Function maxValOutput2

example/performance.cpp:125–137  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

123}
124
125int64_t maxValOutput2(Blockchain &chain, int start, int stop) {
126 auto extract = [](const Transaction &tx) {
127 int64_t maxValue = 0;
128 for(auto output : tx.outputs()) {
129 maxValue = std::max(output.getValue(), maxValue);
130 }
131 return maxValue;
132 };
133
134 auto combine = [](int64_t &a, int64_t &b) -> int64_t & { a = std::max(a,b); return a; };
135
136 return chain[{start, stop}].mapReduce<int64_t>(extract, combine);
137}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected