Browse Source

devtools/dump-gossipstore: get offets correct when we have DELETED entries.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
travis-debug
Rusty Russell 5 years ago
committed by neil saitug
parent
commit
9d336763ff
  1. 3
      devtools/dump-gossipstore.c

3
devtools/dump-gossipstore.c

@ -71,7 +71,7 @@ int main(int argc, char *argv[])
printf("%zu: %s", off, deleted ? "DELETED " : ""); printf("%zu: %s", off, deleted ? "DELETED " : "");
if (deleted && !print_deleted) { if (deleted && !print_deleted) {
printf("\n"); printf("\n");
continue; goto end;
} }
if (fromwire_gossip_store_channel_amount(msg, &sat)) { if (fromwire_gossip_store_channel_amount(msg, &sat)) {
@ -100,6 +100,7 @@ int main(int argc, char *argv[])
warnx("Unknown message %u", warnx("Unknown message %u",
fromwire_peektype(msg)); fromwire_peektype(msg));
} }
end:
off += sizeof(hdr) + msglen; off += sizeof(hdr) + msglen;
tal_free(msg); tal_free(msg);
} }

Loading…
Cancel
Save