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