Move total into stats.
This commit is contained in:
@ -23,7 +23,6 @@
|
||||
void print_help() {
|
||||
puts("Use `/' at the beginning to indicate a command (like in IRC).");
|
||||
puts(" stats -- Give network statistics of the local node.");
|
||||
puts(" num_nodes -- Get total number of nodes.");
|
||||
puts(" exit | quit -- Close the program.");
|
||||
puts(" help -- Show this help information.");
|
||||
}
|
||||
@ -63,14 +62,13 @@ int main(int argc, char *argv[]) {
|
||||
else if(strcmp(in, "/stats") == 0)
|
||||
{
|
||||
struct stats statistics = NeoComm_get_node_stats();
|
||||
printf("Good: %u\nDubious: %u\nCached: %u\nIncoming: %u\n",
|
||||
printf("Good: %u\nDubious: %u\nCached: %u\nIncoming: %u\nTotal: %u\n",
|
||||
statistics.good,
|
||||
statistics.dubious,
|
||||
statistics.cached,
|
||||
statistics.incoming);
|
||||
statistics.incoming,
|
||||
statistics.total);
|
||||
}
|
||||
else if(strcmp(in, "/num_nodes") == 0)
|
||||
printf("%u", NeoComm_count_connected_nodes());
|
||||
else if(strcmp(in, "/help") == 0)
|
||||
print_help();
|
||||
}
|
||||
|
Reference in New Issue
Block a user