fix #2961
This commit is contained in:
parent
91ed74a95f
commit
9f6e174b4f
|
@ -333,7 +333,6 @@ def script_to_p2wsh(script):
|
||||||
return hash_to_segwit_addr(sha256(bfh(script)))
|
return hash_to_segwit_addr(sha256(bfh(script)))
|
||||||
|
|
||||||
def p2wpkh_nested_script(pubkey):
|
def p2wpkh_nested_script(pubkey):
|
||||||
pubkey = safe_parse_pubkey(pubkey)
|
|
||||||
pkh = bh2u(hash_160(bfh(pubkey)))
|
pkh = bh2u(hash_160(bfh(pubkey)))
|
||||||
return '00' + push_script(pkh)
|
return '00' + push_script(pkh)
|
||||||
|
|
||||||
|
|
|
@ -669,7 +669,8 @@ class Transaction:
|
||||||
elif _type in ['p2wpkh', 'p2wsh']:
|
elif _type in ['p2wpkh', 'p2wsh']:
|
||||||
return ''
|
return ''
|
||||||
elif _type == 'p2wpkh-p2sh':
|
elif _type == 'p2wpkh-p2sh':
|
||||||
scriptSig = bitcoin.p2wpkh_nested_script(pubkeys[0])
|
pubkey = safe_parse_pubkey(pubkeys[0])
|
||||||
|
scriptSig = bitcoin.p2wpkh_nested_script(pubkey)
|
||||||
return push_script(scriptSig)
|
return push_script(scriptSig)
|
||||||
elif _type == 'p2wsh-p2sh':
|
elif _type == 'p2wsh-p2sh':
|
||||||
witness_script = self.get_preimage_script(txin)
|
witness_script = self.get_preimage_script(txin)
|
||||||
|
|
Loading…
Reference in New Issue