Process monitor update events in block_[dis]connected asynchronously
[rust-lightning] / lightning / src / ln / reorg_tests.rs
index be5dc43d818f3512d98713a95433cb06cabbc66b..c666e603ebd90d5763039fbd1a26bc409ba1d72c 100644 (file)
@@ -207,6 +207,7 @@ fn test_unconf_chan() {
                nodes[0].node.block_disconnected(&headers.pop().unwrap());
        }
        check_closed_broadcast!(nodes[0], false);
+       nodes[0].node.test_process_background_events(); // Required to free the pending background monitor update
        check_added_monitors!(nodes[0], 1);
        let channel_state = nodes[0].node.channel_state.lock().unwrap();
        assert_eq!(channel_state.by_id.len(), 0);