1
0

transaction: make get_address_from_output_script safer

closes #4743
This commit is contained in:
SomberNight
2018-09-29 19:47:55 +02:00
parent 53fd6a2df5
commit ce5cc135cd
3 changed files with 74 additions and 22 deletions

View File

@@ -296,6 +296,14 @@ class ECPubkey(object):
def is_at_infinity(self):
return self == point_at_infinity()
@classmethod
def is_pubkey_bytes(cls, b: bytes):
try:
ECPubkey(b)
return True
except:
return False
def msg_magic(message: bytes) -> bytes:
from .bitcoin import var_int