Fix feature_taproot functional test which has been failing since

the merge of bitcoin/bitcoin#23394 in 1beaa601b4

Co-authored-by: Sanket Kanjalkar <sanket1729@gmail.com>
This commit is contained in:
James Dorfman 2023-08-10 20:43:07 +00:00
parent b958e586ef
commit bb30fa363d
2 changed files with 47 additions and 24 deletions

View file

@ -916,7 +916,7 @@ def BIP341_sha_prevouts(txTo):
return sha256(b"".join(i.prevout.serialize() for i in txTo.vin))
def BIP341_sha_amounts(spent_utxos):
return sha256(b"".join(struct.pack("<q", u.nValue) for u in spent_utxos))
return sha256(b"".join(u.nAsset.serialize() + u.nValue.serialize() for u in spent_utxos))
def BIP341_sha_scriptpubkeys(spent_utxos):
return sha256(b"".join(ser_string(u.scriptPubKey) for u in spent_utxos))