Browse Source

devtools/create-gossipstore: add --max option to create reduced testsets.

eg. for running under valgrind.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
pr-2587
Rusty Russell 6 years ago
parent
commit
6dd1dacb9c
  1. 5
      devtools/create-gossipstore.c

5
devtools/create-gossipstore.c

@ -42,6 +42,7 @@ int main(int argc, char *argv[])
int infd, outfd;
FILE * scidfd;
struct scidsat * scids;
unsigned max = -1U;
setup_locale();
@ -55,6 +56,8 @@ int main(int argc, char *argv[])
"Input for 'scid, satshis' csv");
opt_register_arg("--sat", opt_set_charp, NULL, &csat,
"default satoshi value if --scidfile flag not present");
opt_register_arg("--max", opt_set_uintval, opt_show_uintval, &max,
"maximum number of messages to read");
opt_register_noarg("--help|-h", opt_usage_and_exit,
"Create gossip store, from be16 / input messages",
"Print this message.");
@ -144,6 +147,8 @@ int main(int argc, char *argv[])
exit(1);
}
tal_free(inmsg);
if (--max == 0)
break;
}
fprintf(stderr, "channels %d, updates %d, nodes %d\n", channels, updates, nodes);
if (scidfile)

Loading…
Cancel
Save