From a025b9c42deaca048620636e73b1a2da29274fb3 Mon Sep 17 00:00:00 2001 From: Roman Khimov Date: Wed, 25 Dec 2019 15:07:11 +0300 Subject: [PATCH] base58: remove bogus code from CheckDecode No other implementation does that and it looks weird, I see nothing meaninful here. --- pkg/encoding/base58/base58.go | 7 ------- 1 file changed, 7 deletions(-) diff --git a/pkg/encoding/base58/base58.go b/pkg/encoding/base58/base58.go index ccac93aca..9c7398500 100644 --- a/pkg/encoding/base58/base58.go +++ b/pkg/encoding/base58/base58.go @@ -16,13 +16,6 @@ func CheckDecode(s string) (b []byte, err error) { return nil, err } - for i := 0; i < len(s); i++ { - if s[i] != '1' { - break - } - b = append([]byte{0x00}, b...) - } - if len(b) < 5 { return nil, errors.New("invalid base-58 check string: missing checksum") }