Browse Source

wallet: remove obsolete peers.

Fixes: #1029
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
ppa-0.6.1
Rusty Russell 7 years ago
committed by Christian Decker
parent
commit
655ae90e5e
  1. 2
      wallet/db.c

2
wallet/db.c

@ -196,6 +196,8 @@ char *dbmigrations[] = {
"DELETE FROM channels WHERE state=1", "DELETE FROM channels WHERE state=1",
/* Keep track of db ugprades, for debugging */ /* Keep track of db ugprades, for debugging */
"CREATE TABLE db_upgrades (upgrade_from INTEGER, lightning_version TEXT);", "CREATE TABLE db_upgrades (upgrade_from INTEGER, lightning_version TEXT);",
/* We used not to clean up peers when their channels were gone. */
"DELETE FROM peers WHERE id NOT IN (SELECT peer_id FROM channels);",
NULL, NULL,
}; };

Loading…
Cancel
Save