Skip to content
This repository has been archived by the owner on May 27, 2020. It is now read-only.

Revert "Fix BIP34 Serialization" #732

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions util.c
Original file line number Diff line number Diff line change
Expand Up @@ -1037,15 +1037,11 @@ int ser_number(unsigned char *s, int32_t val)
int32_t *i32 = (int32_t *)&s[1];
int len;

if (val < 17) {
s[0] = 0x50 + val;
return 1;
}
if (val < 128)
len = 1;
else if (val < 32768)
else if (val < 16512)
len = 2;
else if (val < 8388608)
else if (val < 2113664)
len = 3;
else
len = 4;
Expand Down