Skip to content

Commit 8d79dc0

Browse files
committed
pytest: test for blockheight entries in bookkeeper being saved across restart.
Signed-off-by: Rusty Russell <[email protected]>
1 parent 4f9e13c commit 8d79dc0

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/test_bookkeeper.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1164,6 +1164,7 @@ def test_migration_no_bkpr(node_factory, bitcoind):
11641164
'type': 'channel'}]
11651165

11661166

1167+
@pytest.mark.xfail(strict=True)
11671168
@unittest.skipIf(TEST_NETWORK != 'regtest', "External wallet support doesn't work with elements yet.")
11681169
def test_listincome_timebox(node_factory, bitcoind):
11691170
l1 = node_factory.get_node()
@@ -1193,3 +1194,10 @@ def test_listincome_timebox(node_factory, bitcoind):
11931194

11941195
incomes = l1.rpc.bkpr_listincome(end_time=first_one)['income_events']
11951196
assert [i for i in incomes if i['timestamp'] > first_one] == []
1197+
1198+
# We save blockheights in storage, so make sure we restore them on restart!
1199+
acctevents_before = l1.rpc.bkpr_listaccountevents()
1200+
l1.restart()
1201+
1202+
acctevents_after = l1.rpc.bkpr_listaccountevents()
1203+
assert acctevents_after == acctevents_before

0 commit comments

Comments
 (0)