mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-20 13:37:28 +02:00
[test]decrese num of inputs on partial blind test
This commit is contained in:
parent
254b166574
commit
d584b65c18
1 changed files with 6 additions and 4 deletions
|
|
@ -496,11 +496,11 @@ class CTTest (BitcoinTestFramework):
|
||||||
|
|
||||||
# Create one part of the transaction to partially blind
|
# Create one part of the transaction to partially blind
|
||||||
rawtx = self.nodes[0].createrawtransaction(
|
rawtx = self.nodes[0].createrawtransaction(
|
||||||
inputs, {dst_addr2: Decimal("0.01")})
|
inputs[:1], {dst_addr2: Decimal("0.01")})
|
||||||
|
|
||||||
# Create another part of the transaction to partially blind
|
# Create another part of the transaction to partially blind
|
||||||
rawtx2 = self.nodes[0].createrawtransaction(
|
rawtx2 = self.nodes[0].createrawtransaction(
|
||||||
inputs,
|
inputs[1:],
|
||||||
{dst_addr: Decimal("0.1"), dst_addr3: Decimal("1.0")},
|
{dst_addr: Decimal("0.1"), dst_addr3: Decimal("1.0")},
|
||||||
0,
|
0,
|
||||||
False,
|
False,
|
||||||
|
|
@ -523,13 +523,13 @@ class CTTest (BitcoinTestFramework):
|
||||||
# Combine the transactions
|
# Combine the transactions
|
||||||
|
|
||||||
# Blinded, but incomplete transaction.
|
# Blinded, but incomplete transaction.
|
||||||
# 3 inputs and 1 output, but no fee output, and
|
# 1 inputs and 1 output, but no fee output, and
|
||||||
# it was blinded with 3 asset commitments, that means
|
# it was blinded with 3 asset commitments, that means
|
||||||
# the final transaction should have 3 inputs.
|
# the final transaction should have 3 inputs.
|
||||||
btx = CTransaction()
|
btx = CTransaction()
|
||||||
btx.deserialize(io.BytesIO(hex_str_to_bytes(blindtx)))
|
btx.deserialize(io.BytesIO(hex_str_to_bytes(blindtx)))
|
||||||
|
|
||||||
# Unblinded transaction, with 3 inputs and 2 outputs.
|
# Unblinded transaction, with 2 inputs and 2 outputs.
|
||||||
# We will add them to the other transaction to make it complete.
|
# We will add them to the other transaction to make it complete.
|
||||||
ubtx = CTransaction()
|
ubtx = CTransaction()
|
||||||
ubtx.deserialize(io.BytesIO(hex_str_to_bytes(rawtx2)))
|
ubtx.deserialize(io.BytesIO(hex_str_to_bytes(rawtx2)))
|
||||||
|
|
@ -538,9 +538,11 @@ class CTTest (BitcoinTestFramework):
|
||||||
# on top of inputs and outputs of the blinded, but incomplete transaction.
|
# on top of inputs and outputs of the blinded, but incomplete transaction.
|
||||||
# We also append empty witness instances to make witness arrays match
|
# We also append empty witness instances to make witness arrays match
|
||||||
# vin/vout arrays
|
# vin/vout arrays
|
||||||
|
btx.vin.append(ubtx.vin[0])
|
||||||
btx.wit.vtxinwit.append(CTxInWitness())
|
btx.wit.vtxinwit.append(CTxInWitness())
|
||||||
btx.vout.append(ubtx.vout[0])
|
btx.vout.append(ubtx.vout[0])
|
||||||
btx.wit.vtxoutwit.append(CTxOutWitness())
|
btx.wit.vtxoutwit.append(CTxOutWitness())
|
||||||
|
btx.vin.append(ubtx.vin[1])
|
||||||
btx.wit.vtxinwit.append(CTxInWitness())
|
btx.wit.vtxinwit.append(CTxInWitness())
|
||||||
btx.vout.append(ubtx.vout[1])
|
btx.vout.append(ubtx.vout[1])
|
||||||
btx.wit.vtxoutwit.append(CTxOutWitness())
|
btx.wit.vtxoutwit.append(CTxOutWitness())
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue