f tweak const names somewhat
authorMatt Corallo <git@bluematt.me>
Thu, 28 Oct 2021 18:26:04 +0000 (18:26 +0000)
committerMatt Corallo <git@bluematt.me>
Thu, 28 Oct 2021 18:26:04 +0000 (18:26 +0000)
lightning/src/ln/peer_handler.rs

index 5150365b5e95fb16eeaac1ab20a91dd0dfcb5030..38308bb8c434ff2259779dec267d41c7839e1b81 100644 (file)
@@ -286,8 +286,8 @@ enum InitSyncTracker{
 }
 
 /// The ratio between buffer sizes at which we stop sending initial sync messages vs when we stop
-/// forwarding messages to peers altogether.
-const FORWARD_INIT_SYNC_BUFFER_SIZE_LIMIT: usize = 2;
+/// forwarding gossip messages to peers altogether.
+const FORWARD_INIT_SYNC_BUFFER_LIMIT_RATIO: usize = 2;
 
 /// When the outbound buffer has this many messages, we'll stop reading bytes from the peer until
 /// we have fewer than this many messages in the outbound buffer again.
@@ -296,7 +296,7 @@ const FORWARD_INIT_SYNC_BUFFER_SIZE_LIMIT: usize = 2;
 const OUTBOUND_BUFFER_LIMIT_READ_PAUSE: usize = 10;
 /// When the outbound buffer has this many messages, we'll simply skip relaying gossip messages to
 /// the peer.
-const OUTBOUND_BUFFER_LIMIT_DROP_GOSSIP: usize = OUTBOUND_BUFFER_LIMIT_READ_PAUSE * FORWARD_INIT_SYNC_BUFFER_SIZE_LIMIT;
+const OUTBOUND_BUFFER_LIMIT_DROP_GOSSIP: usize = OUTBOUND_BUFFER_LIMIT_READ_PAUSE * FORWARD_INIT_SYNC_BUFFER_LIMIT_RATIO;
 
 struct Peer {
        channel_encryptor: PeerChannelEncryptor,