mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-08 00:24:28 +01:00
gossip_store: don't copy old delete markers on startup compact.
So we don't have to handle them at load time, either. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -218,6 +218,13 @@ static u32 gossip_store_compact_offline(void)
|
||||
msg, msglen));
|
||||
}
|
||||
|
||||
/* Don't write out old tombstones */
|
||||
if (fromwire_peektype(msg) == WIRE_GOSSIP_STORE_DELETE_CHAN) {
|
||||
deleted++;
|
||||
tal_free(msg);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!write_all(new_fd, &hdr, sizeof(hdr))
|
||||
|| !write_all(new_fd, msg, msglen)) {
|
||||
status_broken("gossip_store_compact_offline: writing msg len %zu to new store: %s",
|
||||
@@ -790,9 +797,6 @@ u32 gossip_store_load(struct routing_state *rstate, struct gossip_store *gs)
|
||||
goto badmsg;
|
||||
}
|
||||
break;
|
||||
case WIRE_GOSSIP_STORE_DELETE_CHAN:
|
||||
/* No need to copy these */
|
||||
break;
|
||||
default:
|
||||
bad = "Unknown message";
|
||||
goto badmsg;
|
||||
|
||||
Reference in New Issue
Block a user