]> git.bitcoin.ninja Git - rapid-gossip-sync-server/commitdiff
Serialize removal of all socket addresses in snapshots.
authorArik Sosman <git@arik.io>
Fri, 7 Jun 2024 18:15:06 +0000 (11:15 -0700)
committerArik Sosman <git@arik.io>
Fri, 7 Jun 2024 18:15:06 +0000 (11:15 -0700)
src/lib.rs

index 58fcc76fb50c70407e7d56abd521f9728d411c17..4da8f38ce1a0e6e5535ea51ae65dd12585a43bda 100644 (file)
@@ -338,13 +338,11 @@ fn serialize_delta<L: Deref + Clone>(serialization_details: &SerializationSet, s
                                                };
                                        }
 
-                                       if total_address_count > 0 {
-                                               // signal the presence of node addresses
-                                               current_node_delta_serialization[0] |= 1 << 2;
-                                               // serialize the actual addresses and count
-                                               total_address_count.write(&mut current_node_delta_serialization).unwrap();
-                                               current_node_delta_serialization.append(&mut address_serialization);
-                                       }
+                                       // signal the presence of node addresses
+                                       current_node_delta_serialization[0] |= 1 << 2;
+                                       // serialize the actual addresses and count
+                                       total_address_count.write(&mut current_node_delta_serialization).unwrap();
+                                       current_node_delta_serialization.append(&mut address_serialization);
                                }
 
                                if node_delta.has_feature_set_changed {