mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 07:04:22 +01:00
wallet: remove obsolete peers.
Fixes: #1029 Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
Christian Decker
parent
ae7d857c44
commit
655ae90e5e
@@ -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,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user