File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -760,6 +760,7 @@ def test_empty_node(node_factory, bitcoind):
760760 l1 .rpc .bkpr_inspect ('wallet' )
761761
762762
763+ @pytest .mark .xfail (strict = True )
763764def test_rebalance_tracking (node_factory , bitcoind ):
764765 """
765766 We identify rebalances (invoices paid and received by our node),
@@ -822,6 +823,18 @@ def test_rebalance_tracking(node_factory, bitcoind):
822823 assert outbound_ev ['credit_msat' ] == Millisatoshi (0 )
823824 assert outbound_ev ['payment_id' ] == pay_hash
824825
826+ # Will reload on restart!
827+ l1 .restart ()
828+
829+ inc_evs = l1 .rpc .bkpr_listincome ()['income_events' ]
830+ outbound_chan_id = only_one (l1 .rpc .listpeerchannels (l2 .info ['id' ])['channels' ])['channel_id' ]
831+
832+ outbound_ev = only_one ([ev for ev in inc_evs if ev ['tag' ] == 'rebalance_fee' ])
833+ assert outbound_ev ['account' ] == outbound_chan_id
834+ assert outbound_ev ['debit_msat' ] == Millisatoshi (1001 )
835+ assert outbound_ev ['credit_msat' ] == Millisatoshi (0 )
836+ assert outbound_ev ['payment_id' ] == pay_hash
837+
825838
826839def test_bookkeeper_custom_notifs (node_factory , chainparams ):
827840 # FIXME: what happens if we send internal funds to 'external' wallet?
You can’t perform that action at this time.
0 commit comments