From 2952c309cb19e7129d6f2579b078eddac0fabf35 Mon Sep 17 00:00:00 2001 From: Andrew Chow Date: Sun, 21 May 2017 23:22:55 -0400 Subject: [PATCH] Correct Compact Size Uint ranges --- _includes/devdoc/ref_transactions.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/_includes/devdoc/ref_transactions.md b/_includes/devdoc/ref_transactions.md index 089bfbc1..6c4d27a2 100644 --- a/_includes/devdoc/ref_transactions.md +++ b/_includes/devdoc/ref_transactions.md @@ -406,12 +406,12 @@ regular unsigned integers. For other numbers up to 0xffffffffffffffff, a byte is prefixed to the number to indicate its length---but otherwise the numbers look like regular unsigned integers in little-endian order. -| Value | Bytes Used | Format -|-----------------------|------------|----------------------------------------- -| <= 252 | 1 | uint8_t -| <= 0xffff | 3 | 0xfd followed by the number as uint16_t -| <= 0xffffffff | 5 | 0xfe followed by the number as uint32_t -| <= 0xffffffffffffffff | 9 | 0xff followed by the number as uint64_t +| Value | Bytes Used | Format +|-----------------------------------------|------------|----------------------------------------- +| >= 0 && <= 252 | 1 | uint8_t +| >= 253 && <= 0xffff | 3 | 0xfd followed by the number as uint16_t +| >= 0x10000 && <= 0xffffffff | 5 | 0xfe followed by the number as uint32_t +| >= 0x100000000 && <= 0xffffffffffffffff | 9 | 0xff followed by the number as uint64_t For example, the number 515 is encoded as 0xfd0302.