Skip to content

Commit f2b4e17

Browse files
committed
Un-export the PrivateRoute inner field as there are invariants
When we make the `PrivateRoute` inner `RouteHint` `pub`, we failed to note that the `PrivateRoute::new` constructor actually verifies a length invariant. Thus, we un-export the inner field and force users to go back through the `new` fn.
1 parent e1897de commit f2b4e17

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lightning-invoice/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,7 @@ impl Ord for Bolt11InvoiceSignature {
527527
/// The encoded route has to be <1024 5bit characters long (<=639 bytes or <=12 hops)
528528
///
529529
#[derive(Clone, Debug, Hash, Eq, PartialEq, Ord, PartialOrd)]
530-
pub struct PrivateRoute(pub RouteHint);
530+
pub struct PrivateRoute(RouteHint);
531531

532532
/// Tag constants as specified in BOLT11
533533
#[allow(missing_docs)]

0 commit comments

Comments
 (0)