transaction: tx.sign API change: rm hex usage
This commit is contained in:
@@ -422,9 +422,9 @@ class Commands:
|
||||
sec = txin_dict.get('privkey')
|
||||
if sec:
|
||||
txin_type, privkey, compressed = bitcoin.deserialize_privkey(sec)
|
||||
pubkey = ecc.ECPrivkey(privkey).get_public_key_hex(compressed=compressed)
|
||||
keypairs[pubkey] = privkey, compressed
|
||||
desc = descriptor.get_singlesig_descriptor_from_legacy_leaf(pubkey=pubkey, script_type=txin_type)
|
||||
pubkey = ecc.ECPrivkey(privkey).get_public_key_bytes(compressed=compressed)
|
||||
keypairs[pubkey] = privkey
|
||||
desc = descriptor.get_singlesig_descriptor_from_legacy_leaf(pubkey=pubkey.hex(), script_type=txin_type)
|
||||
txin.script_descriptor = desc
|
||||
inputs.append(txin)
|
||||
|
||||
@@ -465,7 +465,7 @@ class Commands:
|
||||
if address in txins_dict.keys():
|
||||
for txin in txins_dict[address]:
|
||||
txin.script_descriptor = desc
|
||||
tx.sign({pubkey.hex(): (priv2, compressed)})
|
||||
tx.sign({pubkey: priv2})
|
||||
|
||||
return tx.serialize()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user