]> git.bitcoin.ninja Git - rust-lightning/commitdiff
Add ASCII art diagram explaining offers_tests
authorJeffrey Czyz <jkczyz@gmail.com>
Thu, 21 Dec 2023 00:05:42 +0000 (18:05 -0600)
committerJeffrey Czyz <jkczyz@gmail.com>
Tue, 16 Jan 2024 17:12:36 +0000 (11:12 -0600)
lightning/src/ln/offers_tests.rs

index c8381f2a18022e010f615f41b82ce32fe5a38d8e..0038bdd79a218661161b3053f9dc22481fcb363d 100644 (file)
 //! to initiate and request payment for them, respectively. It also manages the payment flow via
 //! implementing [`OffersMessageHandler`]. This module tests that functionality, including the
 //! resulting [`Event`] generation.
+//!
+//! Two-node success tests use an announced channel:
+//!
+//! Alice --- Bob
+//!
+//! While two-node failure tests use an unannounced channel:
+//!
+//! Alice ... Bob
+//!
+//! Six-node tests use unannounced channels for the sender and recipient and announced channels for
+//! the rest of the network.
+//!
+//!               nodes[4]
+//!              /        \
+//!             /          \
+//!            /            \
+//! Alice ... Bob -------- Charlie ... David
+//!            \            /
+//!             \          /
+//!              \        /
+//!               nodes[5]
+//!
+//! Unnamed nodes are needed to ensure unannounced nodes can create two-hop blinded paths.
+//!
+//! Nodes without channels are disconnected and connected as needed to ensure that deterministic
+//! blinded paths are used.
 
 use core::time::Duration;
 use crate::blinded_path::BlindedPath;