@@ -64,7 +64,8 @@ mod tests {
6464 use elements:: secp256k1_zkp:: ZERO_TWEAK ;
6565 use elements:: {
6666 self , confidential, opcodes, script, secp256k1_zkp, AssetId , AssetIssuance ,
67- EcdsaSigHashType , OutPoint , Script , Transaction , TxIn , TxInWitness , TxOut , Txid ,
67+ EcdsaSigHashType , LockTime , OutPoint , PackedLockTime , Script , Sequence , Transaction , TxIn ,
68+ TxInWitness , TxOut , Txid ,
6869 } ;
6970
7071 use super :: cov:: * ;
@@ -190,7 +191,7 @@ mod tests {
190191 // Now create a transaction spending this.
191192 let mut spend_tx = Transaction {
192193 version : 2 ,
193- lock_time : 0 ,
194+ lock_time : PackedLockTime :: ZERO ,
194195 input : vec ! [ txin_from_txid_vout(
195196 "141f79c7c254ee3a9a9bc76b4f60564385b784bdfc1882b25154617801fe2237" ,
196197 1 ,
@@ -260,7 +261,14 @@ mod tests {
260261
261262 // A pair of satisfiers is also a satisfier
262263 let ( wit, ss) = desc. get_satisfaction ( ( cov_sat, pk_sat) ) ?;
263- let interpreter = Interpreter :: from_txdata ( & desc. script_pubkey ( ) , & ss, & wit, 0 , 0 ) . unwrap ( ) ;
264+ let interpreter = Interpreter :: from_txdata (
265+ & desc. script_pubkey ( ) ,
266+ & ss,
267+ & wit,
268+ Sequence :: ZERO ,
269+ LockTime :: ZERO ,
270+ )
271+ . unwrap ( ) ;
264272
265273 assert ! ( wit[ 0 ] . len( ) <= 73 ) ;
266274 assert ! ( wit[ 1 ] . len( ) == 4 ) ; // version
@@ -385,7 +393,7 @@ mod tests {
385393 // Now create a transaction spending this.
386394 let mut spend_tx = Transaction {
387395 version : 2 ,
388- lock_time : 0 ,
396+ lock_time : PackedLockTime :: ZERO ,
389397 input : vec ! [ txin_from_txid_vout(
390398 "7c8e615c8da947fefd2d9b6f83f313a9b59d249c93a5f232287633195b461cb7" ,
391399 0 ,
@@ -450,15 +458,22 @@ mod tests {
450458
451459 // A pair of satisfiers is also a satisfier
452460 let ( wit, ss) = desc. get_satisfaction ( ( cov_sat, pk_sat) ) . unwrap ( ) ;
453- let interpreter = Interpreter :: from_txdata ( & desc. script_pubkey ( ) , & ss, & wit, 0 , 0 ) . unwrap ( ) ;
461+ let interpreter = Interpreter :: from_txdata (
462+ & desc. script_pubkey ( ) ,
463+ & ss,
464+ & wit,
465+ Sequence :: ZERO ,
466+ LockTime :: ZERO ,
467+ )
468+ . unwrap ( ) ;
454469 // Check that everything is executed correctly with dummysigs
455470 let constraints: Result < Vec < _ > , _ > = interpreter. iter_assume_sigs ( ) . collect ( ) ;
456471 constraints. expect ( "Covenant incorrect satisfaction" ) ;
457472 // Commented Demo test code:
458473 // 1) Send 0.002 btc to above address
459474 // 2) Create a tx by filling up txid
460475 // 3) Send the tx
461- assert_eq ! ( witness_size( & wit) , 384 ) ;
476+ assert_eq ! ( witness_size( & wit) , 385 ) ;
462477 assert_eq ! ( wit. len( ) , 13 ) ;
463478 // spend_tx.input[0].witness.script_witness = wit;
464479 // use elements::encode::serialize_hex;
@@ -472,9 +487,8 @@ mod tests {
472487 txid : Txid :: from_str ( txid) . unwrap ( ) ,
473488 vout : vout,
474489 } ,
475- sequence : 0xfffffffe ,
490+ sequence : Sequence :: MAX ,
476491 is_pegin : false ,
477- has_issuance : false ,
478492 // perhaps make this an option in elements upstream?
479493 asset_issuance : AssetIssuance {
480494 asset_blinding_nonce : secp256k1_zkp:: ZERO_TWEAK ,
0 commit comments