File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -1208,18 +1208,13 @@ mod tests {
1208
1208
#[ test]
1209
1209
fn sighash_single_bug ( ) {
1210
1210
const SIGHASH_SINGLE : u32 = 3 ;
1211
- // We need a tx with more inputs than outputs.
1212
- let mut input = Vec :: new ( ) ;
1213
- input. push ( TxIn :: default ( ) ) ;
1214
- input. push ( TxIn :: default ( ) ) ;
1215
- let mut output = Vec :: new ( ) ;
1216
- output. push ( TxOut :: default ( ) ) ;
1217
1211
1212
+ // We need a tx with more inputs than outputs.
1218
1213
let tx = Transaction {
1219
1214
version : 1 ,
1220
1215
lock_time : 0 ,
1221
- input : input ,
1222
- output : output , // TODO: Use Vec::from([TxOut]) once we bump MSRV.
1216
+ input : vec ! [ TxIn :: default ( ) , TxIn :: default ( ) ] ,
1217
+ output : vec ! [ TxOut :: default ( ) ] ,
1223
1218
} ;
1224
1219
let script = Script :: new ( ) ;
1225
1220
let got = tx. signature_hash ( 1 , & script, SIGHASH_SINGLE ) ;
You can’t perform that action at this time.
0 commit comments