File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -2370,6 +2370,18 @@ mod tests {
2370
2370
assert ! ( <NetworkGraph >:: read( & mut io:: Cursor :: new( & w. 0 ) ) . unwrap( ) == network_graph) ;
2371
2371
}
2372
2372
2373
+ #[ test]
2374
+ fn network_graph_tlv_serialization ( ) {
2375
+ let mut network_graph = create_network_graph ( ) ;
2376
+ network_graph. last_rapid_gossip_sync_timestamp . replace ( 42 ) ;
2377
+
2378
+ let mut w = test_utils:: TestVecWriter ( Vec :: new ( ) ) ;
2379
+ network_graph. write ( & mut w) . unwrap ( ) ;
2380
+ let reassembled_network_graph: NetworkGraph = Readable :: read ( & mut io:: Cursor :: new ( & w. 0 ) ) . unwrap ( ) ;
2381
+ assert ! ( reassembled_network_graph == network_graph) ;
2382
+ assert_eq ! ( reassembled_network_graph. last_rapid_gossip_sync_timestamp. unwrap( ) , 42 ) ;
2383
+ }
2384
+
2373
2385
#[ test]
2374
2386
#[ cfg( feature = "std" ) ]
2375
2387
fn calling_sync_routing_table ( ) {
You can’t perform that action at this time.
0 commit comments