From: Valentine Wallace Date: Wed, 17 Feb 2021 19:18:27 +0000 (-0500) Subject: confirm both mons same upd id X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=32fda9cc05ac3d264f0283f5d246e94844ce5f58;p=rust-lightning confirm both mons same upd id --- diff --git a/lightning-persister/src/lib.rs b/lightning-persister/src/lib.rs index 9162d8215..4ec0b48b2 100644 --- a/lightning-persister/src/lib.rs +++ b/lightning-persister/src/lib.rs @@ -222,18 +222,18 @@ mod tests { // Helper to make sure the channel is on the expected update ID. macro_rules! check_persisted_data { ($expected_update_id: expr) => { - persisted_chan_data_0 = persister_0.load_channel_data(nodes[0].keys_manager).unwrap(); - assert_eq!(persisted_chan_data_0.keys().len(), 1); - for mon in persisted_chan_data_0.values() { - println!("VMW: checking mon 0 update id:"); - assert_eq!(mon.get_latest_update_id(), $expected_update_id); - } persisted_chan_data_1 = persister_1.load_channel_data(nodes[1].keys_manager).unwrap(); assert_eq!(persisted_chan_data_1.keys().len(), 1); for mon in persisted_chan_data_1.values() { println!("VMW: checking mon 1 update id:"); assert_eq!(mon.get_latest_update_id(), $expected_update_id); } + persisted_chan_data_0 = persister_0.load_channel_data(nodes[0].keys_manager).unwrap(); + assert_eq!(persisted_chan_data_0.keys().len(), 1); + for mon in persisted_chan_data_0.values() { + println!("VMW: checking mon 0 update id:"); + assert_eq!(mon.get_latest_update_id(), $expected_update_id); + } } }