@@ -7,7 +7,7 @@ use chain::keysinterface::KeysInterface;
7
7
use ln:: channelmanager:: { ChannelManager , ChannelManagerReadArgs , RAACommitmentOrder , PaymentPreimage , PaymentHash , PaymentSecret , PaymentSendFailure } ;
8
8
use ln:: channelmonitor:: { ChannelMonitor , ManyChannelMonitor } ;
9
9
use routing:: router:: { Route , get_route} ;
10
- use routing:: network_graph:: { NetGraphMsgHandler , NetGraphMsgHandlerReadArgs } ;
10
+ use routing:: network_graph:: { NetGraphMsgHandler } ;
11
11
use ln:: features:: InitFeatures ;
12
12
use ln:: msgs;
13
13
use ln:: msgs:: { ChannelMessageHandler , RoutingMessageHandler } ;
@@ -99,36 +99,6 @@ impl<'a, 'b, 'c> Drop for Node<'a, 'b, 'c> {
99
99
assert ! ( self . node. get_and_clear_pending_events( ) . is_empty( ) ) ;
100
100
assert ! ( self . chan_monitor. added_monitors. lock( ) . unwrap( ) . is_empty( ) ) ;
101
101
102
- // Check that if we serialize the Router, we can deserialize it again.
103
- {
104
- let mut w = test_utils:: TestVecWriter ( Vec :: new ( ) ) ;
105
- self . net_graph_msg_handler . write ( & mut w) . unwrap ( ) ;
106
- let net_graph_msg_handler = NetGraphMsgHandler :: read ( & mut :: std:: io:: Cursor :: new ( & w. 0 ) , NetGraphMsgHandlerReadArgs {
107
- chain_monitor : Arc :: clone ( & self . chain_monitor ) as Arc < chaininterface:: ChainWatchInterface > ,
108
- logger : Arc :: clone ( & self . logger ) as Arc < Logger >
109
- } ) . unwrap ( ) ;
110
- let mut chan_progress = 0 ;
111
- loop {
112
- let orig_announcements = self . net_graph_msg_handler . get_next_channel_announcements ( chan_progress, 255 ) ;
113
- let deserialized_announcements = net_graph_msg_handler. get_next_channel_announcements ( chan_progress, 255 ) ;
114
- assert ! ( orig_announcements == deserialized_announcements) ;
115
- chan_progress = match orig_announcements. last ( ) {
116
- Some ( announcement) => announcement. 0 . contents . short_channel_id + 1 ,
117
- None => break ,
118
- } ;
119
- }
120
- let mut node_progress = None ;
121
- loop {
122
- let orig_announcements = self . net_graph_msg_handler . get_next_node_announcements ( node_progress. as_ref ( ) , 255 ) ;
123
- let deserialized_announcements = net_graph_msg_handler. get_next_node_announcements ( node_progress. as_ref ( ) , 255 ) ;
124
- assert ! ( orig_announcements == deserialized_announcements) ;
125
- node_progress = match orig_announcements. last ( ) {
126
- Some ( announcement) => Some ( announcement. contents . node_id ) ,
127
- None => break ,
128
- } ;
129
- }
130
- }
131
-
132
102
// Check that if we serialize and then deserialize all our channel monitors we get the
133
103
// same set of outputs to watch for on chain as we have now. Note that if we write
134
104
// tests that fully close channels and remove the monitors at some point this may break.
0 commit comments