Skip to content

wallet: initialize previously closed channels #8348

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions tests/test_closing.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,12 @@ def test_closing_simple(node_factory, bitcoind, chainparams):
tags = check_utxos_channel(l1, [channel_id], expected_1)
check_utxos_channel(l2, [channel_id], expected_2, tags)

# Forget channel
bitcoind.generate_block(50)
sync_blockheight(bitcoind, [l1])
l1.restart()
assert only_one(l1.rpc.listclosedchannels()['closedchannels'])['channel_id'] == channel_id


def test_closing_while_disconnected(node_factory, bitcoind, executor):
l1, l2 = node_factory.line_graph(2, opts={'may_reconnect': True})
Expand Down
1 change: 1 addition & 0 deletions wallet/wallet.c
Original file line number Diff line number Diff line change
Expand Up @@ -2344,6 +2344,7 @@ bool wallet_init_channels(struct wallet *w)
{
/* We set the max channel database id separately */
set_max_channel_dbid(w);
wallet_load_closed_channels(w, w->ld->closed_channels);
return wallet_channels_load_active(w);
}

Expand Down