| 28 | using namespace blocksci; |
| 29 | |
| 30 | int main(int argc, const char * argv[]) { |
| 31 | |
| 32 | Blockchain chain(argv[1]); |
| 33 | |
| 34 | int64_t blockCount = 0; |
| 35 | int64_t txCount = 0; |
| 36 | int64_t inputCount = 0; |
| 37 | int64_t outputCount = 0; |
| 38 | |
| 39 | for (auto block : chain) { |
| 40 | blockCount += 1; |
| 41 | RANGES_FOR(auto tx, block) { |
| 42 | txCount += 1; |
| 43 | inputCount += tx.inputCount(); |
| 44 | outputCount += tx.outputCount(); |
| 45 | } |
| 46 | } |
| 47 | |
| 48 | std::cout << "Chain contains:" << std::endl; |
| 49 | std::cout << blockCount << " blocks" << std::endl; |
| 50 | std::cout << txCount << " transactions" << std::endl; |
| 51 | std::cout << inputCount << " inputs" << std::endl; |
| 52 | std::cout << outputCount << " outputs" << std::endl; |
| 53 | |
| 54 | return 0; |
| 55 | } |
| 56 |
nothing calls this directly
no outgoing calls
no test coverage detected