@@ -16,9 +16,8 @@ use std::time::Duration;
1616use log:: { debug, error, info, trace, warn} ;
1717
1818use bitcoin:: consensus:: encode:: deserialize;
19- use bitcoin:: hashes :: hex:: FromHex ;
19+ use bitcoin:: hex:: { DisplayHex , FromHex } ;
2020use bitcoin:: { Script , Txid } ;
21- use bitcoin_private:: hex:: exts:: DisplayHex ;
2221
2322#[ cfg( feature = "use-openssl" ) ]
2423use openssl:: ssl:: { SslConnector , SslMethod , SslStream , SslVerifyMode } ;
@@ -1179,10 +1178,10 @@ mod test {
11791178 let client = RawClient :: new ( get_test_server ( ) , None ) . unwrap ( ) ;
11801179
11811180 // Mt.Gox hack address
1182- let addr = bitcoin:: Address :: from_str ( "1FeexV6bAHb8ybZjqQMjJrcCrHGW9sb6uF" ) . unwrap ( ) ;
1183- let resp = client
1184- . script_get_history ( & addr . payload . script_pubkey ( ) )
1185- . unwrap ( ) ;
1181+ let addr = bitcoin:: Address :: from_str ( "1FeexV6bAHb8ybZjqQMjJrcCrHGW9sb6uF" )
1182+ . unwrap ( )
1183+ . assume_checked ( ) ;
1184+ let resp = client . script_get_history ( & addr . script_pubkey ( ) ) . unwrap ( ) ;
11861185
11871186 assert ! ( resp. len( ) >= 328 ) ;
11881187 assert_eq ! (
@@ -1200,10 +1199,10 @@ mod test {
12001199 let client = RawClient :: new ( get_test_server ( ) , None ) . unwrap ( ) ;
12011200
12021201 // Peter todd's sha256 bounty address https://bitcointalk.org/index.php?topic=293382.0
1203- let addr = bitcoin:: Address :: from_str ( "35Snmmy3uhaer2gTboc81ayCip4m9DT4ko" ) . unwrap ( ) ;
1204- let resp = client
1205- . script_list_unspent ( & addr . payload . script_pubkey ( ) )
1206- . unwrap ( ) ;
1202+ let addr = bitcoin:: Address :: from_str ( "35Snmmy3uhaer2gTboc81ayCip4m9DT4ko" )
1203+ . unwrap ( )
1204+ . assume_checked ( ) ;
1205+ let resp = client . script_list_unspent ( & addr . script_pubkey ( ) ) . unwrap ( ) ;
12071206
12081207 assert ! ( resp. len( ) >= 9 ) ;
12091208 let txid = "397f12ee15f8a3d2ab25c0f6bb7d3c64d2038ca056af10dd8251b98ae0f076b0" ;
@@ -1224,7 +1223,7 @@ mod test {
12241223 // Peter todd's sha256 bounty address https://bitcointalk.org/index.php?topic=293382.0
12251224 let script_1 = bitcoin:: Address :: from_str ( "35Snmmy3uhaer2gTboc81ayCip4m9DT4ko" )
12261225 . unwrap ( )
1227- . payload
1226+ . assume_checked ( )
12281227 . script_pubkey ( ) ;
12291228
12301229 let resp = client
@@ -1246,7 +1245,7 @@ mod test {
12461245
12471246 #[ test]
12481247 fn test_transaction_get ( ) {
1249- use bitcoin:: Txid ;
1248+ use bitcoin:: { transaction , Txid } ;
12501249
12511250 let client = RawClient :: new ( get_test_server ( ) , None ) . unwrap ( ) ;
12521251
@@ -1256,7 +1255,7 @@ mod test {
12561255 . unwrap ( ) ,
12571256 )
12581257 . unwrap ( ) ;
1259- assert_eq ! ( resp. version, 1 ) ;
1258+ assert_eq ! ( resp. version, transaction :: Version :: ONE ) ;
12601259 assert_eq ! ( resp. lock_time. to_consensus_u32( ) , 0 ) ;
12611260 }
12621261
@@ -1340,12 +1339,12 @@ mod test {
13401339 let client = RawClient :: new ( get_test_server ( ) , None ) . unwrap ( ) ;
13411340
13421341 // Mt.Gox hack address
1343- let addr = bitcoin:: Address :: from_str ( "1FeexV6bAHb8ybZjqQMjJrcCrHGW9sb6uF" ) . unwrap ( ) ;
1342+ let addr = bitcoin:: Address :: from_str ( "1FeexV6bAHb8ybZjqQMjJrcCrHGW9sb6uF" )
1343+ . unwrap ( )
1344+ . assume_checked ( ) ;
13441345
13451346 // Just make sure that the call returns Ok(something)
1346- client
1347- . script_subscribe ( & addr. payload . script_pubkey ( ) )
1348- . unwrap ( ) ;
1347+ client. script_subscribe ( & addr. script_pubkey ( ) ) . unwrap ( ) ;
13491348 }
13501349
13511350 #[ test]
0 commit comments