Skip to content

Commit dcacda2

Browse files
committed
Fix build release warning
1 parent 86040e1 commit dcacda2

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

crates/fiber-lib/src/fiber/channel.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1030,15 +1030,16 @@ where
10301030
// The TLC is with a NO_SHARED_SECRET and no onion packet.
10311031
// this may only happen in testing or development environment.
10321032
debug_assert!(add_tlc.onion_packet.is_none());
1033-
#[cfg(not(debug_assertions))]
1034-
{
1033+
if cfg!(debug_assertions) {
1034+
warn!("Processing TLC with no onion packet, only for testing or development environment");
1035+
// allow test code to manually add tlc without onion packet
1036+
true
1037+
} else {
10351038
return Err(ProcessingChannelError::PeelingOnionPacketError(
10361039
"TLC with no onion packet is not supported".to_string(),
10371040
)
10381041
.without_shared_secret());
10391042
}
1040-
// allow test code to manually add tlc without onion packet
1041-
true
10421043
}
10431044
};
10441045

0 commit comments

Comments
 (0)