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 90bcbb2 commit 266c049Copy full SHA for 266c049
lightning/src/blinded_path/message.rs
@@ -188,8 +188,8 @@ pub(super) fn blinded_hops<T: secp256k1::Signing + secp256k1::Verification>(
188
.chain(core::iter::once(ControlTlvs::Receive(ReceiveTlvs{ context: Some(context) })));
189
190
let max_length = tlvs.clone()
191
- .max_by_key(|c| c.serialized_length())
192
- .map(|c| c.serialized_length())
+ .map(|tlv| tlv.serialized_length())
+ .max()
193
.unwrap_or(0);
194
195
let length_tlvs = tlvs.map(|tlv| (max_length, tlv));
0 commit comments