Skip to content

Commit 12136e8

Browse files
committed
f docs
1 parent 9bfb66f commit 12136e8

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

lightning/src/ln/functional_test_utils.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1382,6 +1382,7 @@ impl SendEvent {
13821382
}
13831383

13841384
#[macro_export]
1385+
/// Don't use this, use the identically-named function instead.
13851386
macro_rules! expect_pending_htlcs_forwardable_conditions {
13861387
($node: expr, $expected_failures: expr) => {
13871388
$crate::ln::functional_test_utils::expect_pending_htlcs_forwardable_conditions(&$node, &$expected_failures);
@@ -1403,6 +1404,9 @@ macro_rules! expect_htlc_handling_failed_destinations {
14031404
}}
14041405
}
14051406

1407+
/// Checks that an [`Event::PendingHTLCsForwardable`] is available on the given node and, if there
1408+
/// are any [`Event::HTLCHandlingFailed`] events their [`HTLCDestination`] is included in the
1409+
/// `expected_failures` set.
14061410
pub fn expect_pending_htlcs_forwardable_conditions(node: &Node, expected_failures: &[HTLCDestination]) {
14071411
let events = node.node.get_and_clear_pending_events();
14081412
match events[0] {
@@ -1420,6 +1424,9 @@ pub fn expect_pending_htlcs_forwardable_conditions(node: &Node, expected_failure
14201424

14211425
#[macro_export]
14221426
/// Clears (and ignores) a PendingHTLCsForwardable event
1427+
///
1428+
/// Don't use this, call [`expect_pending_htlcs_forwardable_conditions`] with an empty failure set
1429+
/// instead.
14231430
macro_rules! expect_pending_htlcs_forwardable_ignore {
14241431
($node: expr) => {
14251432
$crate::ln::functional_test_utils::expect_pending_htlcs_forwardable_conditions(&$node, &[]);
@@ -1428,6 +1435,8 @@ macro_rules! expect_pending_htlcs_forwardable_ignore {
14281435

14291436
#[macro_export]
14301437
/// Clears (and ignores) PendingHTLCsForwardable and HTLCHandlingFailed events
1438+
///
1439+
/// Don't use this, call [`expect_pending_htlcs_forwardable_conditions`] instead.
14311440
macro_rules! expect_pending_htlcs_forwardable_and_htlc_handling_failed_ignore {
14321441
($node: expr, $expected_failures: expr) => {
14331442
$crate::ln::functional_test_utils::expect_pending_htlcs_forwardable_conditions(&$node, &$expected_failures);

0 commit comments

Comments
 (0)