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 <decker.christian@gmail.com>
This commit is contained in:
Christian Decker 2018-02-06 13:50:39 +01:00 committed by Rusty Russell
parent 3fdb055606
commit 4f5c47b43b
1 changed files with 1 additions and 1 deletions

View File

@ -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;