| 63 | } |
| 64 | |
| 65 | std::unordered_map<int64_t, int64_t> getOutputDistribution1(Blockchain &chain, int start, int stop) { |
| 66 | |
| 67 | std::unordered_map<int64_t, int64_t> distribution; |
| 68 | for (int height = start; height < stop; height++) { |
| 69 | auto block = chain[height]; |
| 70 | RANGES_FOR(auto tx, block) { |
| 71 | RANGES_FOR(auto output, tx.outputs()) { |
| 72 | auto value = output.getValue(); |
| 73 | value &= ~0xFF; |
| 74 | auto it = distribution.insert(std::make_pair(value, 0)); |
| 75 | it.first->second++; |
| 76 | } |
| 77 | } |
| 78 | |
| 79 | } |
| 80 | return distribution; |
| 81 | } |
| 82 | |
| 83 | std::unordered_map<int64_t, int64_t> getOutputDistribution2(Blockchain &chain, int start, int stop) { |
| 84 | auto mapFunc = [](const BlockRange &segment) { |
nothing calls this directly
no outgoing calls
no test coverage detected