Commit Graph

12 Commits

Author SHA1 Message Date
arowser 890379d8f1 correct format long long unsigned int on 32bits linux 2019-04-30 13:53:15 +02:00
Rusty Russell 14ef3e9565 create-gossipstore: actually use the CSV values.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-04-24 13:46:39 -05:00
Joe Netti 902bb22a92 devtools/create-gossipstore: cleanups
added sanity check to make sure scid of csv is the same as scid in gossip.
Revised style, mem allocation, and error checks

[ Minor fixups, and updated benchmark script -- RR ]

With data.tar.gz: 456609740 Apr  2 12:33

store_load_msec:35300-42354(37118.2+/-2.7e+03)
vsz_kb:582832
store_rewrite_sec:12.700000-13.430000(12.988+/-0.27)
listnodes_sec:3.000000-3.160000(3.076+/-0.057)
listchannels_sec:30.790000-31.690000(31.03+/-0.34)
routing_sec:0.00
peer_write_all_sec:63.640000-67.860000(66.294+/-1.4)
2019-04-24 13:46:39 -05:00
Atis Elsts db2ed9e168 use SCNu64 instead of ld when scanning for a 64-bit value: fixes compilation on Raspberry Pi 2019-04-09 15:13:10 +02:00
William Casarin 6b49b17d6e build: handle possible fscanf errors
on gcc (GCC) 7.4.0

devtools/create-gossipstore.c: In function ‘load_scid_file’:
devtools/create-gossipstore.c:22:9: error: ignoring return value of ‘fscanf’ ...
         fscanf(scidfd, "%d\n", &n);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~
devtools/create-gossipstore.c:24:9: error: ignoring return value of ‘fscanf’ ...
         fscanf(scidfd, "%s\n", title);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make: *** [<builtin>: devtools/create-gossipstore.o] Error 1

Signed-off-by: William Casarin <jb55@jb55.com>
2019-04-08 23:09:53 +02:00
William Casarin 3d98ebbd7f build: fix maybe-uninitialized error on some gcc versions
on gcc (GCC) 7.4.0

devtools/create-gossipstore.c: In function ‘main’:
devtools/create-gossipstore.c:107:9: error: ‘infd’ may be used uninitialized ..
  while (read_all(infd, &be_inlen, sizeof(be_inlen))) {
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: William Casarin <jb55@jb55.com>
2019-04-08 23:09:53 +02:00
William Casarin 8a4ff05a40 nit: remove end-of-line whitespace
Signed-off-by: William Casarin <jb55@jb55.com>
2019-04-08 23:09:53 +02:00
Rusty Russell fbb494fba3 devtools/create-gossipstore: clean up enough to pass check-source.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-04-08 04:41:43 +00:00
Rusty Russell 6dd1dacb9c devtools/create-gossipstore: add --max option to create reduced testsets.
eg. for running under valgrind.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-04-08 04:41:43 +00:00
Rusty Russell b017caaadf devtools/create-gossipstore: don't pollute output with message.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-04-08 04:41:43 +00:00
Joe Netti 294394215e create-gossipstore.c can read scid -> satoshis csv file. The csv is in the format scid ,satoshis where there is a black space after scid. Made a header file that contains a struct. Modified makefile. Added cmdline arg --scidfile /path/to/csv and made the constant capacity command optional. create-gossipstore prints stats at the end. 2019-04-08 04:41:43 +00:00
Rusty Russell 3d8c1f0c02 devtools/create-gossipstore: tool to create a gossip_store file from stream of gossip.
The gossip is expected to be in format:

    16-bit-big-endian-length
    [gossip message]

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-04-08 04:41:43 +00:00