@@ -495,11 +495,11 @@ def run_test(self):
495
495
496
496
# Create one part of the transaction to partially blind
497
497
rawtx = self .nodes [0 ].createrawtransaction (
498
- inputs , {dst_addr2 : Decimal ("0.01" )})
498
+ inputs [: 1 ] , {dst_addr2 : Decimal ("0.01" )})
499
499
500
500
# Create another part of the transaction to partially blind
501
501
rawtx2 = self .nodes [0 ].createrawtransaction (
502
- inputs ,
502
+ inputs [ 1 :] ,
503
503
{dst_addr : Decimal ("0.1" ), dst_addr3 : Decimal ("1.0" )},
504
504
0 ,
505
505
False ,
@@ -522,13 +522,13 @@ def run_test(self):
522
522
# Combine the transactions
523
523
524
524
# Blinded, but incomplete transaction.
525
- # 3 inputs and 1 output, but no fee output, and
525
+ # 1 inputs and 1 output, but no fee output, and
526
526
# it was blinded with 3 asset commitments, that means
527
527
# the final transaction should have 3 inputs.
528
528
btx = CTransaction ()
529
529
btx .deserialize (io .BytesIO (hex_str_to_bytes (blindtx )))
530
530
531
- # Unblinded transaction, with 3 inputs and 2 outputs.
531
+ # Unblinded transaction, with 2 inputs and 2 outputs.
532
532
# We will add them to the other transaction to make it complete.
533
533
ubtx = CTransaction ()
534
534
ubtx .deserialize (io .BytesIO (hex_str_to_bytes (rawtx2 )))
@@ -537,9 +537,11 @@ def run_test(self):
537
537
# on top of inputs and outputs of the blinded, but incomplete transaction.
538
538
# We also append empty witness instances to make witness arrays match
539
539
# vin/vout arrays
540
+ btx .vin .append (ubtx .vin [0 ])
540
541
btx .wit .vtxinwit .append (CTxInWitness ())
541
542
btx .vout .append (ubtx .vout [0 ])
542
543
btx .wit .vtxoutwit .append (CTxOutWitness ())
544
+ btx .vin .append (ubtx .vin [1 ])
543
545
btx .wit .vtxinwit .append (CTxInWitness ())
544
546
btx .vout .append (ubtx .vout [1 ])
545
547
btx .wit .vtxoutwit .append (CTxOutWitness ())
0 commit comments