mirror of
https://github.com/JoinMarket-Org/joinmarket-clientserver.git
synced 2026-08-13 12:33:40 +02:00
Rename functions which create multisig scripts
This commit is contained in:
parent
53b056e5db
commit
d86df334c3
2 changed files with 5 additions and 5 deletions
|
|
@ -534,7 +534,7 @@ def pubkey_to_p2wpkh_address(pub):
|
|||
script = pubkey_to_p2wpkh_script(pub)
|
||||
return script_to_address(script)
|
||||
|
||||
def pubkeys_to_p2wsh_script(pubs):
|
||||
def pubkeys_to_p2wsh_multisig_script(pubs):
|
||||
""" Given a list of N pubkeys, constructs an N of N
|
||||
multisig scriptPubKey of type pay-to-witness-script-hash.
|
||||
No other scripts than N-N multisig supported as of now.
|
||||
|
|
@ -543,12 +543,12 @@ def pubkeys_to_p2wsh_script(pubs):
|
|||
script = mk_multisig_script(pubs, N)
|
||||
return P2WSH_PRE + bin_sha256(binascii.unhexlify(script))
|
||||
|
||||
def pubkeys_to_p2wsh_address(pubs):
|
||||
def pubkeys_to_p2wsh_multisig_address(pubs):
|
||||
""" Given a list of N pubkeys, constructs an N of N
|
||||
multisig address of type pay-to-witness-script-hash.
|
||||
No other scripts than N-N multisig supported as of now.
|
||||
"""
|
||||
script = pubkeys_to_p2wsh_script(pubs)
|
||||
script = pubkeys_to_p2wsh_multisig_script(pubs)
|
||||
return script_to_address(script)
|
||||
|
||||
def deserialize_script(scriptinp):
|
||||
|
|
|
|||
|
|
@ -244,8 +244,8 @@ def test_spend_p2wsh(setup_tx_creation):
|
|||
privs = [binascii.hexlify(priv).decode('ascii') for priv in privs]
|
||||
pubs = [bitcoin.privkey_to_pubkey(priv) for priv in privs]
|
||||
redeemScripts = [bitcoin.mk_multisig_script(pubs[i:i+2], 2) for i in [0, 2]]
|
||||
scriptPubKeys = [bitcoin.pubkeys_to_p2wsh_script(pubs[i:i+2]) for i in [0, 2]]
|
||||
addresses = [bitcoin.pubkeys_to_p2wsh_address(pubs[i:i+2]) for i in [0, 2]]
|
||||
scriptPubKeys = [bitcoin.pubkeys_to_p2wsh_multisig_script(pubs[i:i+2]) for i in [0, 2]]
|
||||
addresses = [bitcoin.pubkeys_to_p2wsh_multisig_address(pubs[i:i+2]) for i in [0, 2]]
|
||||
#pay into it
|
||||
wallet_service = make_wallets(1, [[3, 0, 0, 0, 0]], 3)[0]['wallet']
|
||||
wallet_service.sync_wallet(fast=True)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue