lnproxy on Nostr: 😂 damn /// Lightning TLV uses a custom variable-length integer called `BigSize`. ...
😂 damn
/// Lightning TLV uses a custom variable-length integer called `BigSize`. It is similar to Bitcoin's
/// variable-length integers except that it is serialized in big-endian instead of little-endian.
///
/// Like Bitcoin's variable-length integer, it exhibits ambiguity in that certain values can be
/// encoded in several different ways, which we must check for at deserialization-time. Thus, if
/// you're looking for an example of a variable-length integer to use for your own project, move
/// along, this is a rather poor design.
https://github.com/lightningdevkit/rust-lightning/blob/e0a0add9fe0b239f8a5176ab62e7ba3cb4f541ca/lightning/src/util/ser.rs#L322
/// Lightning TLV uses a custom variable-length integer called `BigSize`. It is similar to Bitcoin's
/// variable-length integers except that it is serialized in big-endian instead of little-endian.
///
/// Like Bitcoin's variable-length integer, it exhibits ambiguity in that certain values can be
/// encoded in several different ways, which we must check for at deserialization-time. Thus, if
/// you're looking for an example of a variable-length integer to use for your own project, move
/// along, this is a rather poor design.
https://github.com/lightningdevkit/rust-lightning/blob/e0a0add9fe0b239f8a5176ab62e7ba3cb4f541ca/lightning/src/util/ser.rs#L322