File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
test/functional/test_framework Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ class AddressType(enum.Enum):
3535 legacy = 'legacy' # P2PKH
3636
3737
38- chars = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'
38+ b58chars = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'
3939
4040
4141def create_deterministic_address_bcrt1_p2tr_op_true ():
@@ -59,10 +59,10 @@ def byte_to_base58(b, version):
5959 b += hash256 (b )[:4 ] # append checksum
6060 value = int .from_bytes (b , 'big' )
6161 while value > 0 :
62- result = chars [value % 58 ] + result
62+ result = b58chars [value % 58 ] + result
6363 value //= 58
6464 while b [0 ] == 0 :
65- result = chars [0 ] + result
65+ result = b58chars [0 ] + result
6666 b = b [1 :]
6767 return result
6868
@@ -76,16 +76,16 @@ def base58_to_byte(s):
7676 n = 0
7777 for c in s :
7878 n *= 58
79- assert c in chars
80- digit = chars .index (c )
79+ assert c in b58chars
80+ digit = b58chars .index (c )
8181 n += digit
8282 h = '%x' % n
8383 if len (h ) % 2 :
8484 h = '0' + h
8585 res = n .to_bytes ((n .bit_length () + 7 ) // 8 , 'big' )
8686 pad = 0
8787 for c in s :
88- if c == chars [0 ]:
88+ if c == b58chars [0 ]:
8989 pad += 1
9090 else :
9191 break
You can’t perform that action at this time.
0 commit comments