Commit message · Andrew PoelstraMerge rust-bitcoin/rust-bitcoin#7058: consensus_encoding: fix wrong default limit in CompactSizeDecoder docs
20c2dc05939132e1747dd023196224c950a70239 consensus_encoding: fix wrong default limit in CompactSizeDecoder docs (kleonyuan)
Pull request description:
The `CompactSizeDecoder` documentation stated that the decoded value is bounded
by a default limit of 4,000,000. This is incorrect: the default limit is
`MAX_COMPACT_SIZE = 0x0200_0000`, i.e. 33,554,432 bytes (32 MiB), which is the
value used by `CompactSizeDecoder::new()` and is already stated elsewhere in the
same doc block (`new`, `new_with_limit`).
The 4,000,000 figure is the limit used by the vec decoders (`MAX_VEC_SIZE`), not
by compact-size decoding, so it looks like a copy-paste error.
ACKs for top commit:
apoelstra:
ACK 20c2dc05939132e1747dd023196224c950a70239; successfully ran local tests
Tree-SHA512: 51bf13b507e4b99d0bc8e2da9f0abaa6c312909ef1f8a87951ddbd97896d5257c795fa010a7d212640297fa9e8c2ae7990348c6750cbb0027c597eb11eeb4aea
91/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference
Why it was queuedconsensus or confidential-proof validationmerge-commit duplicate discount
AI analysis · Informational 15/100This change only corrects a mistake in a code comment. The documentation for CompactSizeDecoder wrongly said the default size limit was 4,000,000, when the actual default is about 33.5 million (32 MB). No program behavior was changed; only the explanatory text was fixed.