From 9d336763ff5219c5fd03c4a53d722a3d39f8be47 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Tue, 8 Oct 2019 11:36:24 +1030 Subject: [PATCH] devtools/dump-gossipstore: get offets correct when we have DELETED entries. Signed-off-by: Rusty Russell --- devtools/dump-gossipstore.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/devtools/dump-gossipstore.c b/devtools/dump-gossipstore.c index 61b7e50b5..b60f04f51 100644 --- a/devtools/dump-gossipstore.c +++ b/devtools/dump-gossipstore.c @@ -71,7 +71,7 @@ int main(int argc, char *argv[]) printf("%zu: %s", off, deleted ? "DELETED " : ""); if (deleted && !print_deleted) { printf("\n"); - continue; + goto end; } if (fromwire_gossip_store_channel_amount(msg, &sat)) { @@ -100,6 +100,7 @@ int main(int argc, char *argv[]) warnx("Unknown message %u", fromwire_peektype(msg)); } + end: off += sizeof(hdr) + msglen; tal_free(msg); }