base58: remove bogus code from CheckDecode

No other implementation does that and it looks weird, I see nothing meaninful
here.
This commit is contained in:
Roman Khimov 2019-12-25 15:07:11 +03:00
parent 369ac01a27
commit a025b9c42d

View file

@ -16,13 +16,6 @@ func CheckDecode(s string) (b []byte, err error) {
return nil, err return nil, err
} }
for i := 0; i < len(s); i++ {
if s[i] != '1' {
break
}
b = append([]byte{0x00}, b...)
}
if len(b) < 5 { if len(b) < 5 {
return nil, errors.New("invalid base-58 check string: missing checksum") return nil, errors.New("invalid base-58 check string: missing checksum")
} }