]> git.bitcoin.ninja Git - rust-lightning/commit
Implement buffering onion messages for peers.
authorValentine Wallace <vwallace@protonmail.com>
Thu, 25 Aug 2022 18:30:29 +0000 (14:30 -0400)
committerValentine Wallace <vwallace@protonmail.com>
Fri, 26 Aug 2022 23:03:07 +0000 (19:03 -0400)
commitf4834def9d304002642cc1907432d2053519857d
tree7995854a8ebb3d6492ebd605b1a1c97dd3bad694
parentb28783a0b5b537acb4891438adcf5f83c239256a
Implement buffering onion messages for peers.

In this commit, we check if a peer's outbound buffer has room for onion
messages, and if so pulls them from an implementer of a new trait,
OnionMessageProvider.

Makes sure channel messages are prioritized over OMs, and OMs are prioritized
over gossip.

The onion_message module remains private until further rate limiting is added.
lightning/src/ln/peer_handler.rs