From 4f5c47b43b1abceed3e99c365f03cb640454889f Mon Sep 17 00:00:00 2001 From: Christian Decker Date: Tue, 6 Feb 2018 13:50:39 +0100 Subject: [PATCH] wallet: Do not consider OPENINGD channels as active Still writing the channel since some of the channel setup parameters depends on `chan->id` to be set. If we later set the `chan->id` signatures fail. This prevents OPENINGD channels showing up after restarting. Signed-off-by: Christian Decker --- wallet/wallet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wallet/wallet.c b/wallet/wallet.c index db89a5d49..871e6ec35 100644 --- a/wallet/wallet.c +++ b/wallet/wallet.c @@ -607,7 +607,7 @@ bool wallet_channels_load_active(const tal_t *ctx, struct wallet *w, struct list /* Channels are active if they have reached at least the * opening state and they are not marked as complete */ sqlite3_stmt *stmt = db_query( - __func__, w->db, "SELECT %s FROM channels WHERE state >= %d AND state != %d;", + __func__, w->db, "SELECT %s FROM channels WHERE state > %d AND state != %d;", channel_fields, OPENINGD, CLOSINGD_COMPLETE); int count = 0;