]> git.bitcoin.ninja Git - rust-lightning/commit
Cache our node ID in ChannelManager
authorMatt Corallo <git@bluematt.me>
Wed, 31 Mar 2021 23:54:32 +0000 (19:54 -0400)
committerMatt Corallo <git@bluematt.me>
Wed, 31 Mar 2021 23:55:25 +0000 (19:55 -0400)
commit780625674d11c2e72279f4587e52627e14bb1710
treefcc54ab0ed289a213f088cd41bacf656fd27764e
parent5927920f684f91fbd3c859811daa76d6166946a0
Cache our node ID in ChannelManager

While its not necessarily a common operation on a running node,
`get_our_node_id()` is used incredibly heavily in tests, and there
is no reason to not eat the extra ~64 bytes to just cache it.
lightning/src/ln/channelmanager.rs