Skip to content

Commit d584b65

Browse files
committed
[test]decrese num of inputs on partial blind test
1 parent 254b166 commit d584b65

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

test/functional/feature_confidential_transactions.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -496,11 +496,11 @@ def run_test(self):
496496

497497
# Create one part of the transaction to partially blind
498498
rawtx = self.nodes[0].createrawtransaction(
499-
inputs, {dst_addr2: Decimal("0.01")})
499+
inputs[:1], {dst_addr2: Decimal("0.01")})
500500

501501
# Create another part of the transaction to partially blind
502502
rawtx2 = self.nodes[0].createrawtransaction(
503-
inputs,
503+
inputs[1:],
504504
{dst_addr: Decimal("0.1"), dst_addr3: Decimal("1.0")},
505505
0,
506506
False,
@@ -523,13 +523,13 @@ def run_test(self):
523523
# Combine the transactions
524524

525525
# Blinded, but incomplete transaction.
526-
# 3 inputs and 1 output, but no fee output, and
526+
# 1 inputs and 1 output, but no fee output, and
527527
# it was blinded with 3 asset commitments, that means
528528
# the final transaction should have 3 inputs.
529529
btx = CTransaction()
530530
btx.deserialize(io.BytesIO(hex_str_to_bytes(blindtx)))
531531

532-
# Unblinded transaction, with 3 inputs and 2 outputs.
532+
# Unblinded transaction, with 2 inputs and 2 outputs.
533533
# We will add them to the other transaction to make it complete.
534534
ubtx = CTransaction()
535535
ubtx.deserialize(io.BytesIO(hex_str_to_bytes(rawtx2)))
@@ -538,9 +538,11 @@ def run_test(self):
538538
# on top of inputs and outputs of the blinded, but incomplete transaction.
539539
# We also append empty witness instances to make witness arrays match
540540
# vin/vout arrays
541+
btx.vin.append(ubtx.vin[0])
541542
btx.wit.vtxinwit.append(CTxInWitness())
542543
btx.vout.append(ubtx.vout[0])
543544
btx.wit.vtxoutwit.append(CTxOutWitness())
545+
btx.vin.append(ubtx.vin[1])
544546
btx.wit.vtxinwit.append(CTxInWitness())
545547
btx.vout.append(ubtx.vout[1])
546548
btx.wit.vtxoutwit.append(CTxOutWitness())

0 commit comments

Comments
 (0)