mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-24 01:24:26 +01:00
pyln: Moves old zbase32 test from primitives
This commit is contained in:
committed by
Christian Decker
parent
f497b90ee8
commit
3779c0b6ee
@@ -1,5 +1,4 @@
|
||||
from binascii import hexlify, unhexlify
|
||||
from pyln.proto import zbase32
|
||||
from binascii import unhexlify
|
||||
from pyln.proto.primitives import ShortChannelId
|
||||
|
||||
|
||||
@@ -19,12 +18,3 @@ def test_short_channel_id():
|
||||
assert(expected.to_bytes() == b)
|
||||
assert(str(expected) == s)
|
||||
assert(expected.to_int() == num)
|
||||
|
||||
|
||||
def test_zbase32():
|
||||
zb32 = b'd75qtmgijm79rpooshmgzjwji9gj7dsdat8remuskyjp9oq1ugkaoj6orbxzhuo4njtyh96e3aq84p1tiuz77nchgxa1s4ka4carnbiy'
|
||||
b = zbase32.decode(zb32)
|
||||
assert(hexlify(b) == b'1f76e8acd54afbf23610b7166ba689afcc9e8ec3c44e442e765012dfc1d299958827d0205f7e4e1a12620e7fc8ce1c7d3651acefde899c33f12b6958d3304106a0')
|
||||
|
||||
enc = zbase32.encode(b)
|
||||
assert(enc == zb32)
|
||||
|
||||
Reference in New Issue
Block a user