We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5b2aaa4 commit 6233678Copy full SHA for 6233678
lightning/src/blinded_path/message.rs
@@ -149,8 +149,8 @@ pub(super) fn blinded_hops<T: secp256k1::Signing + secp256k1::Verification>(
149
.chain(core::iter::once(ControlTlvs::Receive(ReceiveTlvs{ context: Some(context) })));
150
151
let max_length = tlvs.clone()
152
- .max_by_key(|c| c.serialized_length())
153
- .map(|c| c.serialized_length())
+ .map(|tlv| tlv.serialized_length())
+ .max()
154
.unwrap_or(0);
155
156
let length_tlvs = tlvs.map(|tlv| (max_length, tlv));
0 commit comments