Tobin Harding
unread,Sep 2, 2024, 7:20:39 PMSep 2Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to bitco...@googlegroups.com, Andrew Poelstra, Martin Habovštiak
Hi,
Context:
- The `ReadCompactSize` function takes an optional `range_check`
parameter that defaults to `true` (see `serialize.h`).
- `range_check == true` enforces that the compact size value is less
than 0x02000000 i.e., if fits within a 32 unsigned integer.
- Grepping the code base shows that `ReadCompactSize` is never called
with `false`.
My question is please:
Is there any reason not use a 32 bit integer for a value encoded using
CompactSize and ignore the 0xFF/9-byte-encoding of a compact size all
together?
Thanks,
Tobin.