Skip to content

Commit

Permalink
wallet: remove obsolete peers.
Browse files Browse the repository at this point in the history
Fixes: #1029
Signed-off-by: Rusty Russell <[email protected]>
  • Loading branch information
rustyrussell committed Feb 22, 2018
1 parent b536e97 commit 67ca2a9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions wallet/db.c
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,8 @@ char *dbmigrations[] = {
"DELETE FROM channels WHERE state=1",
/* Keep track of db ugprades, for debugging */
"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,
};

Expand Down

0 comments on commit 67ca2a9

Please sign in to comment.