Skip to content

Commit 60b77f6

Browse files
committed
Bolt 1: Clarify the definition of tu fields
Truncated integer fields, e.g. tu16 cannot have leading zeros judging by the implementations of the parsers, which are used across the different ln implementations. The `can` imposed that it is not necessary to truncate the fields to values of information. Signed-off-by: Peter Neuroth <[email protected]>
1 parent 50b2df2 commit 60b77f6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

01-messaging.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -225,11 +225,11 @@ Various fundamental types are referred to in the message specifications:
225225
* `u64`: an 8 byte unsigned integer
226226

227227
Inside TLV records which contain a single value, leading zeros in
228-
integers can be omitted:
228+
truncated integers MUST be omitted:
229229

230-
* `tu16`: a 0 to 2 byte unsigned integer
231-
* `tu32`: a 0 to 4 byte unsigned integer
232-
* `tu64`: a 0 to 8 byte unsigned integer
230+
* `tu16`: a 0 to 2 byte truncated unsigned integer
231+
* `tu32`: a 0 to 4 byte truncated unsigned integer
232+
* `tu64`: a 0 to 8 byte truncated unsigned integer
233233

234234
When used to encode amounts, the previous fields MUST comply with the upper
235235
bound of 21 million BTC:

0 commit comments

Comments
 (0)