Skip to content

Commit 0839966

Browse files
committed
f - add comment about minimal encoding of type id
1 parent a36fb87 commit 0839966

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lightning/src/util/ser_macros.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -236,8 +236,10 @@ macro_rules! decode_tlv_stream_range {
236236
},
237237
Err(e) => return Err(e),
238238
Ok(t) => if $range.contains(&t.0) { t } else {
239-
use $crate::util::ser::Writeable;
240239
drop(tracking_reader);
240+
241+
// Assumes the type id is minimally encoded, which is enforced on read.
242+
use $crate::util::ser::Writeable;
241243
let bytes_read = t.serialized_length();
242244
$rewind(stream_ref, bytes_read);
243245
break 'tlv_read;

0 commit comments

Comments
 (0)