@@ -27,8 +27,8 @@ use bitcoin::hashes::hex::{FromHex, ToHex};
27
27
use bitcoin:: hashes:: Hash ;
28
28
use bitcoin:: secp256k1;
29
29
use 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 ,
32
32
} ;
33
33
use bitcoincore_rpc:: bitcoincore_rpc_json:: {
34
34
GetBlockTemplateModes , GetBlockTemplateRules , ScanTxOutRequest ,
@@ -537,7 +537,7 @@ fn test_get_block_filter(cl: &Client) {
537
537
fn test_sign_raw_transaction_with_send_raw_transaction ( cl : & Client ) {
538
538
let sk = PrivateKey {
539
539
network : Network :: Regtest ,
540
- key : secp256k1:: SecretKey :: new ( & mut secp256k1:: rand:: thread_rng ( ) ) ,
540
+ inner : secp256k1:: SecretKey :: new ( & mut secp256k1:: rand:: thread_rng ( ) ) ,
541
541
compressed : true ,
542
542
} ;
543
543
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) {
559
559
} ,
560
560
sequence: 0xFFFFFFFF ,
561
561
script_sig: Script :: new( ) ,
562
- witness: Vec :: new( ) ,
562
+ witness: Witness :: new( ) ,
563
563
} ] ,
564
564
output : vec ! [ TxOut {
565
565
value: ( unspent. amount - * FEE ) . as_sat( ) ,
@@ -588,7 +588,7 @@ fn test_sign_raw_transaction_with_send_raw_transaction(cl: &Client) {
588
588
} ,
589
589
script_sig: Script :: new( ) ,
590
590
sequence: 0xFFFFFFFF ,
591
- witness: Vec :: new( ) ,
591
+ witness: Witness :: new( ) ,
592
592
} ] ,
593
593
output : vec ! [ TxOut {
594
594
value: ( unspent. amount - * FEE - * FEE ) . as_sat( ) ,
@@ -597,7 +597,7 @@ fn test_sign_raw_transaction_with_send_raw_transaction(cl: &Client) {
597
597
} ;
598
598
599
599
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 ( ) ;
601
601
assert ! ( res. complete) ;
602
602
let _ = cl. send_raw_transaction ( & res. transaction ( ) . unwrap ( ) ) . unwrap ( ) ;
603
603
}
@@ -846,7 +846,7 @@ fn test_list_received_by_address(cl: &Client) {
846
846
fn test_import_public_key ( cl : & Client ) {
847
847
let sk = PrivateKey {
848
848
network : Network :: Regtest ,
849
- key : secp256k1:: SecretKey :: new ( & mut secp256k1:: rand:: thread_rng ( ) ) ,
849
+ inner : secp256k1:: SecretKey :: new ( & mut secp256k1:: rand:: thread_rng ( ) ) ,
850
850
compressed : true ,
851
851
} ;
852
852
cl. import_public_key ( & sk. public_key ( & SECP ) , None , None ) . unwrap ( ) ;
@@ -857,7 +857,7 @@ fn test_import_public_key(cl: &Client) {
857
857
fn test_import_priv_key ( cl : & Client ) {
858
858
let sk = PrivateKey {
859
859
network : Network :: Regtest ,
860
- key : secp256k1:: SecretKey :: new ( & mut secp256k1:: rand:: thread_rng ( ) ) ,
860
+ inner : secp256k1:: SecretKey :: new ( & mut secp256k1:: rand:: thread_rng ( ) ) ,
861
861
compressed : true ,
862
862
} ;
863
863
cl. import_private_key ( & sk, None , None ) . unwrap ( ) ;
@@ -868,7 +868,7 @@ fn test_import_priv_key(cl: &Client) {
868
868
fn test_import_address ( cl : & Client ) {
869
869
let sk = PrivateKey {
870
870
network : Network :: Regtest ,
871
- key : secp256k1:: SecretKey :: new ( & mut secp256k1:: rand:: thread_rng ( ) ) ,
871
+ inner : secp256k1:: SecretKey :: new ( & mut secp256k1:: rand:: thread_rng ( ) ) ,
872
872
compressed : true ,
873
873
} ;
874
874
let addr = Address :: p2pkh ( & sk. public_key ( & SECP ) , Network :: Regtest ) ;
@@ -880,7 +880,7 @@ fn test_import_address(cl: &Client) {
880
880
fn test_import_address_script ( cl : & Client ) {
881
881
let sk = PrivateKey {
882
882
network : Network :: Regtest ,
883
- key : secp256k1:: SecretKey :: new ( & mut secp256k1:: rand:: thread_rng ( ) ) ,
883
+ inner : secp256k1:: SecretKey :: new ( & mut secp256k1:: rand:: thread_rng ( ) ) ,
884
884
compressed : true ,
885
885
} ;
886
886
let addr = Address :: p2pkh ( & sk. public_key ( & SECP ) , Network :: Regtest ) ;
0 commit comments