bookkeeper: fix reloading of rebalances.

Parse key correctly.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Fixed: bookkeeper: failed reload of rebalances on restart.
This commit is contained in:
Rusty Russell
2025-09-22 11:50:02 +09:30
parent ea1d233dc1
commit 343d30ae5b
2 changed files with 1 additions and 2 deletions

View File

@@ -135,7 +135,7 @@ struct rebalances *init_rebalances(const tal_t *ctx,
goto weird;
/* key = ["bookkeeper", "rebalances", "<lesser>-<greater>"] */
if (!split_tok(buf, keytok + 2, '-', &lessertok, &greatertok))
if (!split_tok(buf, keytok + 3, '-', &lessertok, &greatertok))
goto weird;
if (!json_to_u64(buf, &lessertok, &lesser)

View File

@@ -760,7 +760,6 @@ def test_empty_node(node_factory, bitcoind):
l1.rpc.bkpr_inspect('wallet')
@pytest.mark.xfail(strict=True)
def test_rebalance_tracking(node_factory, bitcoind):
"""
We identify rebalances (invoices paid and received by our node),