@@ -11,28 +11,28 @@ use bdk_chain::CheckPoint;
1111use bitcoin:: address:: NetworkChecked ;
1212use bitcoin:: hex:: HexToBytesError ;
1313use core:: time:: Duration ;
14- use electrsd:: corepc_node :: mtype:: GetBlockTemplate ;
15- use electrsd:: corepc_node :: { TemplateRequest , TemplateRules } ;
14+ use electrsd:: bitcoind :: mtype:: GetBlockTemplate ;
15+ use electrsd:: bitcoind :: { TemplateRequest , TemplateRules } ;
1616
1717pub use electrsd;
18+ pub use electrsd:: bitcoind;
19+ pub use electrsd:: bitcoind:: anyhow;
1820pub use electrsd:: corepc_client;
19- pub use electrsd:: corepc_node;
20- pub use electrsd:: corepc_node:: anyhow;
2121pub use electrsd:: electrum_client;
2222use electrsd:: electrum_client:: ElectrumApi ;
2323
2424/// Struct for running a regtest environment with a single `bitcoind` node with an `electrs`
2525/// instance connected to it.
2626pub struct TestEnv {
27- pub bitcoind : electrsd:: corepc_node :: Node ,
27+ pub bitcoind : electrsd:: bitcoind :: BitcoinD ,
2828 pub electrsd : electrsd:: ElectrsD ,
2929}
3030
3131/// Configuration parameters.
3232#[ derive( Debug ) ]
3333pub struct Config < ' a > {
34- /// [`corepc_node ::Conf`]
35- pub bitcoind : corepc_node :: Conf < ' a > ,
34+ /// [`bitcoind ::Conf`]
35+ pub bitcoind : bitcoind :: Conf < ' a > ,
3636 /// [`electrsd::Conf`]
3737 pub electrsd : electrsd:: Conf < ' a > ,
3838}
@@ -42,7 +42,7 @@ impl Default for Config<'_> {
4242 /// which is required for testing `bdk_esplora`.
4343 fn default ( ) -> Self {
4444 Self {
45- bitcoind : corepc_node :: Conf :: default ( ) ,
45+ bitcoind : bitcoind :: Conf :: default ( ) ,
4646 electrsd : {
4747 let mut conf = electrsd:: Conf :: default ( ) ;
4848 conf. http_enabled = true ;
@@ -88,11 +88,11 @@ impl TestEnv {
8888 pub fn new_with_config ( config : Config ) -> anyhow:: Result < Self > {
8989 let bitcoind_exe = match std:: env:: var ( "BITCOIND_EXE" ) {
9090 Ok ( path) => path,
91- Err ( _) => corepc_node :: downloaded_exe_path ( ) . context (
91+ Err ( _) => bitcoind :: downloaded_exe_path ( ) . context (
9292 "you need to provide an env var BITCOIND_EXE or specify a bitcoind version feature" ,
9393 ) ?,
9494 } ;
95- let bitcoind = corepc_node :: Node :: with_conf ( bitcoind_exe, & config. bitcoind ) ?;
95+ let bitcoind = bitcoind :: BitcoinD :: with_conf ( bitcoind_exe, & config. bitcoind ) ?;
9696
9797 let electrs_exe = match std:: env:: var ( "ELECTRS_EXE" ) {
9898 Ok ( path) => path,
@@ -110,7 +110,7 @@ impl TestEnv {
110110 }
111111
112112 /// Exposes the RPC calls from [`corepc_client`].
113- pub fn rpc_client ( & self ) -> & corepc_node :: Client {
113+ pub fn rpc_client ( & self ) -> & bitcoind :: Client {
114114 & self . bitcoind . client
115115 }
116116
@@ -428,7 +428,7 @@ mod test {
428428 use bdk_chain:: bitcoin:: opcodes:: OP_TRUE ;
429429 use bdk_chain:: bitcoin:: Amount ;
430430 use core:: time:: Duration ;
431- use electrsd:: corepc_node :: anyhow:: Result ;
431+ use electrsd:: bitcoind :: anyhow:: Result ;
432432 use std:: collections:: BTreeSet ;
433433
434434 /// This checks that reorgs initiated by `bitcoind` is detected by our `electrsd` instance.
0 commit comments