added option to print peer list
This commit is contained in:
parent
29de8fd0b3
commit
78d526da16
@ -4,7 +4,7 @@
|
||||
#include "node.h"
|
||||
|
||||
|
||||
#define DEBUG_LEVEL 0
|
||||
#define DEBUG_LEVEL 6
|
||||
|
||||
void welcome();
|
||||
|
||||
|
@ -1440,6 +1440,8 @@ int run_node(int sock_fd){
|
||||
if (strcmp("",input_buffer) == 0){
|
||||
print_info(">> Printing all messages we know of so far :");
|
||||
print_data_info(data_list);
|
||||
} else if (strcmp("p",input_buffer) == 0) {
|
||||
print_peers(neighbour_list);
|
||||
} else {
|
||||
if (DEBUG_LEVEL > 0) {
|
||||
printf("\x1b[31m[DEBUG]\x1b[0m >> Adding following message to the table : “%s”\n", input_buffer );
|
||||
@ -1602,6 +1604,8 @@ int bootstrap_node(int * sock_fd, char * root_peer_ip, uint16_t root_peer_port){
|
||||
our_data->seqno = 1337;
|
||||
our_data->data = NULL;
|
||||
|
||||
|
||||
|
||||
freeaddrinfo(res);
|
||||
print_debug(">> Boostraping done.");
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user