]> git.bitcoin.ninja Git - rust-lightning/commit
Store the source and destination `node_counter`s in `ChannelInfo`
authorMatt Corallo <git@bluematt.me>
Thu, 7 Dec 2023 04:32:06 +0000 (04:32 +0000)
committerMatt Corallo <git@bluematt.me>
Wed, 19 Jun 2024 13:57:41 +0000 (13:57 +0000)
commita17a159c937578abbd57e3e271be4fcc47b1620d
treedfabf89e9f42d8bb9f0d6cc44b36fffdc378d7f8
parent6d714b8cbd467b2a0efe39e5973994857149a233
Store the source and destination `node_counter`s in `ChannelInfo`

In the next commit, we'll use the new `node_counter`s to remove a
`HashMap` from the router, using a `Vec` to store all our per-node
information. In order to make finding entries in that `Vec` cheap,
here we store the source and destintaion `node_counter`s in
`ChannelInfo`, givind us the counters for both ends of a channel
without doing a second `HashMap` lookup.
lightning/src/routing/gossip.rs