@@ -123,7 +123,7 @@ def test_simple_doublespend(self):
123123
124124 tx1a = CTransaction ()
125125 tx1a .vin = [CTxIn (tx0_outpoint , nSequence = 0 )]
126- tx1a .vout = [CTxOut (1 * COIN , CScript ([b'a' ]))]
126+ tx1a .vout = [CTxOut (1 * COIN , CScript ([b'a' * 35 ]))]
127127 tx1a_hex = txToHex (tx1a )
128128 tx1a_txid = self .nodes [0 ].sendrawtransaction (tx1a_hex , True )
129129
@@ -132,7 +132,7 @@ def test_simple_doublespend(self):
132132 # Should fail because we haven't changed the fee
133133 tx1b = CTransaction ()
134134 tx1b .vin = [CTxIn (tx0_outpoint , nSequence = 0 )]
135- tx1b .vout = [CTxOut (1 * COIN , CScript ([b'b' ]))]
135+ tx1b .vout = [CTxOut (1 * COIN , CScript ([b'b' * 35 ]))]
136136 tx1b_hex = txToHex (tx1b )
137137
138138 # This will raise an exception due to insufficient fee
@@ -143,7 +143,7 @@ def test_simple_doublespend(self):
143143 # Extra 0.1 BTC fee
144144 tx1b = CTransaction ()
145145 tx1b .vin = [CTxIn (tx0_outpoint , nSequence = 0 )]
146- tx1b .vout = [CTxOut (int (0.9 * COIN ), CScript ([b'b' ]))]
146+ tx1b .vout = [CTxOut (int (0.9 * COIN ), CScript ([b'b' * 35 ]))]
147147 tx1b_hex = txToHex (tx1b )
148148 # Replacement still disabled even with "enough fee"
149149 assert_raises_rpc_error (- 26 , "txn-mempool-conflict" , self .nodes [1 ].sendrawtransaction , tx1b_hex , True )
@@ -175,7 +175,7 @@ def test_doublespend_chain(self):
175175 remaining_value -= 1 * COIN
176176 tx = CTransaction ()
177177 tx .vin = [CTxIn (prevout , nSequence = 0 )]
178- tx .vout = [CTxOut (remaining_value , CScript ([1 ]))]
178+ tx .vout = [CTxOut (remaining_value , CScript ([1 , OP_DROP ] * 15 + [ 1 ]))]
179179 tx_hex = txToHex (tx )
180180 txid = self .nodes [0 ].sendrawtransaction (tx_hex , True )
181181 chain_txids .append (txid )
@@ -185,7 +185,7 @@ def test_doublespend_chain(self):
185185 # child fees - 40 BTC - so this attempt is rejected.
186186 dbl_tx = CTransaction ()
187187 dbl_tx .vin = [CTxIn (tx0_outpoint , nSequence = 0 )]
188- dbl_tx .vout = [CTxOut (initial_nValue - 30 * COIN , CScript ([1 ]))]
188+ dbl_tx .vout = [CTxOut (initial_nValue - 30 * COIN , CScript ([1 ] * 35 ))]
189189 dbl_tx_hex = txToHex (dbl_tx )
190190
191191 # This will raise an exception due to insufficient fee
@@ -194,7 +194,7 @@ def test_doublespend_chain(self):
194194 # Accepted with sufficient fee
195195 dbl_tx = CTransaction ()
196196 dbl_tx .vin = [CTxIn (tx0_outpoint , nSequence = 0 )]
197- dbl_tx .vout = [CTxOut (1 * COIN , CScript ([1 ]))]
197+ dbl_tx .vout = [CTxOut (1 * COIN , CScript ([1 ] * 35 ))]
198198 dbl_tx_hex = txToHex (dbl_tx )
199199 self .nodes [0 ].sendrawtransaction (dbl_tx_hex , True )
200200
@@ -247,15 +247,15 @@ def branch(prevout, initial_value, max_txs, tree_width=5, fee=0.0001*COIN, _tota
247247 # Attempt double-spend, will fail because too little fee paid
248248 dbl_tx = CTransaction ()
249249 dbl_tx .vin = [CTxIn (tx0_outpoint , nSequence = 0 )]
250- dbl_tx .vout = [CTxOut (initial_nValue - fee * n , CScript ([1 ]))]
250+ dbl_tx .vout = [CTxOut (initial_nValue - fee * n , CScript ([1 ] * 35 ))]
251251 dbl_tx_hex = txToHex (dbl_tx )
252252 # This will raise an exception due to insufficient fee
253253 assert_raises_rpc_error (- 26 , "insufficient fee" , self .nodes [0 ].sendrawtransaction , dbl_tx_hex , True )
254254
255255 # 1 BTC fee is enough
256256 dbl_tx = CTransaction ()
257257 dbl_tx .vin = [CTxIn (tx0_outpoint , nSequence = 0 )]
258- dbl_tx .vout = [CTxOut (initial_nValue - fee * n - 1 * COIN , CScript ([1 ]))]
258+ dbl_tx .vout = [CTxOut (initial_nValue - fee * n - 1 * COIN , CScript ([1 ] * 35 ))]
259259 dbl_tx_hex = txToHex (dbl_tx )
260260 self .nodes [0 ].sendrawtransaction (dbl_tx_hex , True )
261261
@@ -275,7 +275,7 @@ def branch(prevout, initial_value, max_txs, tree_width=5, fee=0.0001*COIN, _tota
275275
276276 dbl_tx = CTransaction ()
277277 dbl_tx .vin = [CTxIn (tx0_outpoint , nSequence = 0 )]
278- dbl_tx .vout = [CTxOut (initial_nValue - 2 * fee * n , CScript ([1 ]))]
278+ dbl_tx .vout = [CTxOut (initial_nValue - 2 * fee * n , CScript ([1 ] * 35 ))]
279279 dbl_tx_hex = txToHex (dbl_tx )
280280 # This will raise an exception
281281 assert_raises_rpc_error (- 26 , "too many potential replacements" , self .nodes [0 ].sendrawtransaction , dbl_tx_hex , True )
@@ -290,7 +290,7 @@ def test_replacement_feeperkb(self):
290290
291291 tx1a = CTransaction ()
292292 tx1a .vin = [CTxIn (tx0_outpoint , nSequence = 0 )]
293- tx1a .vout = [CTxOut (1 * COIN , CScript ([b'a' ]))]
293+ tx1a .vout = [CTxOut (1 * COIN , CScript ([b'a' * 35 ]))]
294294 tx1a_hex = txToHex (tx1a )
295295 self .nodes [0 ].sendrawtransaction (tx1a_hex , True )
296296
@@ -311,7 +311,7 @@ def test_spends_of_conflicting_outputs(self):
311311
312312 tx1a = CTransaction ()
313313 tx1a .vin = [CTxIn (utxo1 , nSequence = 0 )]
314- tx1a .vout = [CTxOut (int (1.1 * COIN ), CScript ([b'a' ]))]
314+ tx1a .vout = [CTxOut (int (1.1 * COIN ), CScript ([b'a' * 35 ]))]
315315 tx1a_hex = txToHex (tx1a )
316316 tx1a_txid = self .nodes [0 ].sendrawtransaction (tx1a_hex , True )
317317
@@ -330,7 +330,7 @@ def test_spends_of_conflicting_outputs(self):
330330 # Spend tx1a's output to test the indirect case.
331331 tx1b = CTransaction ()
332332 tx1b .vin = [CTxIn (COutPoint (tx1a_txid , 0 ), nSequence = 0 )]
333- tx1b .vout = [CTxOut (1 * COIN , CScript ([b'a' ]))]
333+ tx1b .vout = [CTxOut (1 * COIN , CScript ([b'a' * 35 ]))]
334334 tx1b_hex = txToHex (tx1b )
335335 tx1b_txid = self .nodes [0 ].sendrawtransaction (tx1b_hex , True )
336336 tx1b_txid = int (tx1b_txid , 16 )
@@ -351,7 +351,7 @@ def test_new_unconfirmed_inputs(self):
351351
352352 tx1 = CTransaction ()
353353 tx1 .vin = [CTxIn (confirmed_utxo )]
354- tx1 .vout = [CTxOut (1 * COIN , CScript ([b'a' ]))]
354+ tx1 .vout = [CTxOut (1 * COIN , CScript ([b'a' * 35 ]))]
355355 tx1_hex = txToHex (tx1 )
356356 self .nodes [0 ].sendrawtransaction (tx1_hex , True )
357357
@@ -390,7 +390,7 @@ def test_too_many_replacements(self):
390390 for i in range (MAX_REPLACEMENT_LIMIT + 1 ):
391391 tx_i = CTransaction ()
392392 tx_i .vin = [CTxIn (COutPoint (txid , i ), nSequence = 0 )]
393- tx_i .vout = [CTxOut (split_value - fee , CScript ([b'a' ]))]
393+ tx_i .vout = [CTxOut (split_value - fee , CScript ([b'a' * 35 ]))]
394394 tx_i_hex = txToHex (tx_i )
395395 self .nodes [0 ].sendrawtransaction (tx_i_hex , True )
396396
@@ -423,14 +423,14 @@ def test_opt_in(self):
423423 # Create a non-opting in transaction
424424 tx1a = CTransaction ()
425425 tx1a .vin = [CTxIn (tx0_outpoint , nSequence = 0xffffffff )]
426- tx1a .vout = [CTxOut (1 * COIN , CScript ([b'a' ]))]
426+ tx1a .vout = [CTxOut (1 * COIN , CScript ([b'a' * 35 ]))]
427427 tx1a_hex = txToHex (tx1a )
428428 tx1a_txid = self .nodes [0 ].sendrawtransaction (tx1a_hex , True )
429429
430430 # Shouldn't be able to double-spend
431431 tx1b = CTransaction ()
432432 tx1b .vin = [CTxIn (tx0_outpoint , nSequence = 0 )]
433- tx1b .vout = [CTxOut (int (0.9 * COIN ), CScript ([b'b' ]))]
433+ tx1b .vout = [CTxOut (int (0.9 * COIN ), CScript ([b'b' * 35 ]))]
434434 tx1b_hex = txToHex (tx1b )
435435
436436 # This will raise an exception
@@ -441,14 +441,14 @@ def test_opt_in(self):
441441 # Create a different non-opting in transaction
442442 tx2a = CTransaction ()
443443 tx2a .vin = [CTxIn (tx1_outpoint , nSequence = 0xfffffffe )]
444- tx2a .vout = [CTxOut (1 * COIN , CScript ([b'a' ]))]
444+ tx2a .vout = [CTxOut (1 * COIN , CScript ([b'a' * 35 ]))]
445445 tx2a_hex = txToHex (tx2a )
446446 tx2a_txid = self .nodes [0 ].sendrawtransaction (tx2a_hex , True )
447447
448448 # Still shouldn't be able to double-spend
449449 tx2b = CTransaction ()
450450 tx2b .vin = [CTxIn (tx1_outpoint , nSequence = 0 )]
451- tx2b .vout = [CTxOut (int (0.9 * COIN ), CScript ([b'b' ]))]
451+ tx2b .vout = [CTxOut (int (0.9 * COIN ), CScript ([b'b' * 35 ]))]
452452 tx2b_hex = txToHex (tx2b )
453453
454454 # This will raise an exception
@@ -471,12 +471,12 @@ def test_opt_in(self):
471471
472472 tx3b = CTransaction ()
473473 tx3b .vin = [CTxIn (COutPoint (tx1a_txid , 0 ), nSequence = 0 )]
474- tx3b .vout = [CTxOut (int (0.5 * COIN ), CScript ([b'e' ]))]
474+ tx3b .vout = [CTxOut (int (0.5 * COIN ), CScript ([b'e' * 35 ]))]
475475 tx3b_hex = txToHex (tx3b )
476476
477477 tx3c = CTransaction ()
478478 tx3c .vin = [CTxIn (COutPoint (tx2a_txid , 0 ), nSequence = 0 )]
479- tx3c .vout = [CTxOut (int (0.5 * COIN ), CScript ([b'f' ]))]
479+ tx3c .vout = [CTxOut (int (0.5 * COIN ), CScript ([b'f' * 35 ]))]
480480 tx3c_hex = txToHex (tx3c )
481481
482482 self .nodes [0 ].sendrawtransaction (tx3b_hex , True )
@@ -493,7 +493,7 @@ def test_prioritised_transactions(self):
493493
494494 tx1a = CTransaction ()
495495 tx1a .vin = [CTxIn (tx0_outpoint , nSequence = 0 )]
496- tx1a .vout = [CTxOut (1 * COIN , CScript ([b'a' ]))]
496+ tx1a .vout = [CTxOut (1 * COIN , CScript ([b'a' * 35 ]))]
497497 tx1a_hex = txToHex (tx1a )
498498 tx1a_txid = self .nodes [0 ].sendrawtransaction (tx1a_hex , True )
499499
@@ -519,14 +519,14 @@ def test_prioritised_transactions(self):
519519
520520 tx2a = CTransaction ()
521521 tx2a .vin = [CTxIn (tx1_outpoint , nSequence = 0 )]
522- tx2a .vout = [CTxOut (1 * COIN , CScript ([b'a' ]))]
522+ tx2a .vout = [CTxOut (1 * COIN , CScript ([b'a' * 35 ]))]
523523 tx2a_hex = txToHex (tx2a )
524524 self .nodes [0 ].sendrawtransaction (tx2a_hex , True )
525525
526526 # Lower fee, but we'll prioritise it
527527 tx2b = CTransaction ()
528528 tx2b .vin = [CTxIn (tx1_outpoint , nSequence = 0 )]
529- tx2b .vout = [CTxOut (int (1.01 * COIN ), CScript ([b'a' ]))]
529+ tx2b .vout = [CTxOut (int (1.01 * COIN ), CScript ([b'a' * 35 ]))]
530530 tx2b .rehash ()
531531 tx2b_hex = txToHex (tx2b )
532532
0 commit comments