]> git.bitcoin.ninja Git - rust-lightning/commitdiff
confirm both mons same upd id
authorValentine Wallace <vwallace@protonmail.com>
Wed, 17 Feb 2021 19:18:27 +0000 (14:18 -0500)
committerValentine Wallace <vwallace@protonmail.com>
Wed, 17 Feb 2021 19:18:27 +0000 (14:18 -0500)
lightning-persister/src/lib.rs

index 9162d8215f68cf423979faa5a754baf03c81efc5..4ec0b48b2a5bc97bec7c673daa046daf14e5ac5f 100644 (file)
@@ -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);
+                               }
                        }
                }