We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1abc722 commit 4e6aa70Copy full SHA for 4e6aa70
1 file changed
lightning/src/ln/resource_manager.rs
@@ -459,9 +459,9 @@ impl Channel {
459
general_bucket_pct,
460
congestion_bucket_pct,
461
);
462
- debug_assert!(alloc.general_slots >= 5, "5 is the minimum we need for general bucket");
463
- debug_assert!(alloc.congestion_slots > 0);
464
- debug_assert!(alloc.protected_slots > 0);
+ if alloc.general_slots < 5 || alloc.congestion_slots == 0 || alloc.protected_slots == 0 {
+ return Err(());
+ }
465
466
Ok(Channel {
467
max_htlc_value_in_flight_msat,
0 commit comments