@@ -27,8 +27,8 @@ use bitcoin::hashes::hex::{FromHex, ToHex};
2727use bitcoin:: hashes:: Hash ;
2828use bitcoin:: secp256k1;
2929use bitcoin:: {
30- Address , Amount , Network , OutPoint , PrivateKey , Script , SigHashType , SignedAmount , Transaction ,
31- TxIn , TxOut , Txid ,
30+ Address , Amount , Network , OutPoint , PrivateKey , Script , EcdsaSighashType , SignedAmount , Transaction ,
31+ TxIn , TxOut , Txid , Witness ,
3232} ;
3333use bitcoincore_rpc:: bitcoincore_rpc_json:: {
3434 GetBlockTemplateModes , GetBlockTemplateRules , ScanTxOutRequest ,
@@ -537,7 +537,7 @@ fn test_get_block_filter(cl: &Client) {
537537fn test_sign_raw_transaction_with_send_raw_transaction ( cl : & Client ) {
538538 let sk = PrivateKey {
539539 network : Network :: Regtest ,
540- key : secp256k1:: SecretKey :: new ( & mut secp256k1:: rand:: thread_rng ( ) ) ,
540+ inner : secp256k1:: SecretKey :: new ( & mut secp256k1:: rand:: thread_rng ( ) ) ,
541541 compressed : true ,
542542 } ;
543543 let addr = Address :: p2wpkh ( & sk. public_key ( & SECP ) , Network :: Regtest ) . unwrap ( ) ;
@@ -559,7 +559,7 @@ fn test_sign_raw_transaction_with_send_raw_transaction(cl: &Client) {
559559 } ,
560560 sequence: 0xFFFFFFFF ,
561561 script_sig: Script :: new( ) ,
562- witness: Vec :: new( ) ,
562+ witness: Witness :: new( ) ,
563563 } ] ,
564564 output : vec ! [ TxOut {
565565 value: ( unspent. amount - * FEE ) . as_sat( ) ,
@@ -588,7 +588,7 @@ fn test_sign_raw_transaction_with_send_raw_transaction(cl: &Client) {
588588 } ,
589589 script_sig: Script :: new( ) ,
590590 sequence: 0xFFFFFFFF ,
591- witness: Vec :: new( ) ,
591+ witness: Witness :: new( ) ,
592592 } ] ,
593593 output : vec ! [ TxOut {
594594 value: ( unspent. amount - * FEE - * FEE ) . as_sat( ) ,
@@ -597,7 +597,7 @@ fn test_sign_raw_transaction_with_send_raw_transaction(cl: &Client) {
597597 } ;
598598
599599 let res =
600- cl. sign_raw_transaction_with_key ( & tx, & [ sk] , None , Some ( SigHashType :: All . into ( ) ) ) . unwrap ( ) ;
600+ cl. sign_raw_transaction_with_key ( & tx, & [ sk] , None , Some ( EcdsaSighashType :: All . into ( ) ) ) . unwrap ( ) ;
601601 assert ! ( res. complete) ;
602602 let _ = cl. send_raw_transaction ( & res. transaction ( ) . unwrap ( ) ) . unwrap ( ) ;
603603}
@@ -846,7 +846,7 @@ fn test_list_received_by_address(cl: &Client) {
846846fn test_import_public_key ( cl : & Client ) {
847847 let sk = PrivateKey {
848848 network : Network :: Regtest ,
849- key : secp256k1:: SecretKey :: new ( & mut secp256k1:: rand:: thread_rng ( ) ) ,
849+ inner : secp256k1:: SecretKey :: new ( & mut secp256k1:: rand:: thread_rng ( ) ) ,
850850 compressed : true ,
851851 } ;
852852 cl. import_public_key ( & sk. public_key ( & SECP ) , None , None ) . unwrap ( ) ;
@@ -857,7 +857,7 @@ fn test_import_public_key(cl: &Client) {
857857fn test_import_priv_key ( cl : & Client ) {
858858 let sk = PrivateKey {
859859 network : Network :: Regtest ,
860- key : secp256k1:: SecretKey :: new ( & mut secp256k1:: rand:: thread_rng ( ) ) ,
860+ inner : secp256k1:: SecretKey :: new ( & mut secp256k1:: rand:: thread_rng ( ) ) ,
861861 compressed : true ,
862862 } ;
863863 cl. import_private_key ( & sk, None , None ) . unwrap ( ) ;
@@ -868,7 +868,7 @@ fn test_import_priv_key(cl: &Client) {
868868fn test_import_address ( cl : & Client ) {
869869 let sk = PrivateKey {
870870 network : Network :: Regtest ,
871- key : secp256k1:: SecretKey :: new ( & mut secp256k1:: rand:: thread_rng ( ) ) ,
871+ inner : secp256k1:: SecretKey :: new ( & mut secp256k1:: rand:: thread_rng ( ) ) ,
872872 compressed : true ,
873873 } ;
874874 let addr = Address :: p2pkh ( & sk. public_key ( & SECP ) , Network :: Regtest ) ;
@@ -880,7 +880,7 @@ fn test_import_address(cl: &Client) {
880880fn test_import_address_script ( cl : & Client ) {
881881 let sk = PrivateKey {
882882 network : Network :: Regtest ,
883- key : secp256k1:: SecretKey :: new ( & mut secp256k1:: rand:: thread_rng ( ) ) ,
883+ inner : secp256k1:: SecretKey :: new ( & mut secp256k1:: rand:: thread_rng ( ) ) ,
884884 compressed : true ,
885885 } ;
886886 let addr = Address :: p2pkh ( & sk. public_key ( & SECP ) , Network :: Regtest ) ;
0 commit comments