mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 18:11:28 +01:00
pyln: hexlify -> bytes.hex() in pyln.proto.wire
This commit is contained in:
parent
27e495efa5
commit
3edbacbb3c
@ -1,4 +1,3 @@
|
||||
from binascii import hexlify
|
||||
from cryptography.exceptions import InvalidTag
|
||||
from cryptography.hazmat.backends import default_backend
|
||||
from cryptography.hazmat.primitives import hashes
|
||||
@ -79,7 +78,7 @@ class Secret(object):
|
||||
self.raw = raw
|
||||
|
||||
def __str__(self):
|
||||
return "Secret[0x{}]".format(hexlify(self.raw).decode('ASCII'))
|
||||
return "Secret[0x{}]".format(self.raw.hex())
|
||||
|
||||
|
||||
class PublicKey(object):
|
||||
@ -105,7 +104,7 @@ class PublicKey(object):
|
||||
|
||||
def __str__(self):
|
||||
return "PublicKey[0x{}]".format(
|
||||
hexlify(self.serializeCompressed()).decode('ASCII')
|
||||
self.serializeCompressed().hex()
|
||||
)
|
||||
|
||||
|
||||
@ -128,7 +127,7 @@ class Sha256Mixer(object):
|
||||
return self.hash
|
||||
|
||||
def __str__(self):
|
||||
return "Sha256Mixer[0x{}]".format(hexlify(self.hash).decode('ASCII'))
|
||||
return "Sha256Mixer[0x{}]".format(self.hash.hex())
|
||||
|
||||
|
||||
class LightningConnection(object):
|
||||
|
Loading…
Reference in New Issue
Block a user