| 179 | } |
| 180 | |
| 181 | int64_t calculateMaxInputMultithreaded(BlockRange &chain) { |
| 182 | auto extract = [&](const Transaction &tx) { |
| 183 | int64_t maxValue = 0; |
| 184 | for(auto input : tx.inputs()) { |
| 185 | maxValue = std::max(input.getValue(), maxValue); |
| 186 | } |
| 187 | return maxValue; |
| 188 | }; |
| 189 | |
| 190 | auto combine = [](int64_t &a, int64_t &b) -> int64_t & { a = std::max(a,b); return a; }; |
| 191 | |
| 192 | return chain.mapReduce<int64_t>(extract, combine); |
| 193 | } |
| 194 | |
| 195 | int64_t calculateMaxFeeSingleThreaded(BlockRange &chain) { |
| 196 | int64_t curMax = 0; |
nothing calls this directly
no outgoing calls
no test coverage detected