Quellcode durchsuchen

net/protocol/protocal_address: minor calculation fix

aggstam vor 2 Jahren
Ursprung
Commit
5be166b686
1 geänderte Dateien mit 1 neuen und 1 gelöschten Zeilen
  1. 1 1
      src/net/protocol/protocol_address.rs

+ 1 - 1
src/net/protocol/protocol_address.rs

@@ -136,7 +136,7 @@ impl ProtocolAddress {
 
 
             // Then we grab addresses without the requested transports
             // Then we grab addresses without the requested transports
             // to fill a 2 * max length vector.
             // to fill a 2 * max length vector.
-            let remain = 2 * get_addrs_msg.max - get_addrs_msg.max;
+            let remain = 2 * get_addrs_msg.max - addrs.len();
             addrs.append(
             addrs.append(
                 &mut self
                 &mut self
                     .hosts
                     .hosts