1
0

fix: p2pk output serialisation

This commit is contained in:
SomberNight
2017-09-15 05:50:12 +02:00
parent f0fe84d959
commit 33157d3718
2 changed files with 8 additions and 2 deletions

View File

@@ -357,6 +357,10 @@ def address_to_scripthash(addr):
h = sha256(bytes.fromhex(script))[0:32]
return bytes(reversed(h)).hex()
def public_key_to_p2pk_script(pubkey):
script = push_script(pubkey)
script += 'ac' # op_checksig
return script
__b58chars = b'123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'
assert len(__b58chars) == 58