@@ -69,12 +69,10 @@ fn reqwest_client() -> reqwest::Client {
6969pub struct ClientWrapper {
7070 binary_path : sync:: Mutex < Option < PathBuf > > ,
7171 testing_prng_seed : Option < u64 > ,
72- storage : String ,
73- wallet : String ,
74- keystore : String ,
7572 max_pending_message_bundles : usize ,
7673 network : Network ,
7774 pub path_provider : PathProvider ,
75+ wallet_id : usize ,
7876 on_drop : OnClientDrop ,
7977 extra_args : Vec < String > ,
8078}
@@ -93,14 +91,14 @@ impl ClientWrapper {
9391 path_provider : PathProvider ,
9492 network : Network ,
9593 testing_prng_seed : Option < u64 > ,
96- id : usize ,
94+ wallet_id : usize ,
9795 on_drop : OnClientDrop ,
9896 ) -> Self {
9997 Self :: new_with_extra_args (
10098 path_provider,
10199 network,
102100 testing_prng_seed,
103- id ,
101+ wallet_id ,
104102 on_drop,
105103 vec ! [ "--wait-for-outgoing-messages" . to_string( ) ] ,
106104 )
@@ -110,26 +108,17 @@ impl ClientWrapper {
110108 path_provider : PathProvider ,
111109 network : Network ,
112110 testing_prng_seed : Option < u64 > ,
113- id : usize ,
111+ wallet_id : usize ,
114112 on_drop : OnClientDrop ,
115113 extra_args : Vec < String > ,
116114 ) -> Self {
117- let storage = format ! (
118- "rocksdb:{}/client_{}.db" ,
119- path_provider. path( ) . display( ) ,
120- id
121- ) ;
122- let wallet = format ! ( "wallet_{}.json" , id) ;
123- let keystore = format ! ( "keystore_{}.json" , id) ;
124115 Self {
125116 binary_path : sync:: Mutex :: new ( None ) ,
126117 testing_prng_seed,
127- storage,
128- wallet,
129- keystore,
130118 max_pending_message_bundles : 10_000 ,
131119 network,
132120 path_provider,
121+ wallet_id,
133122 on_drop,
134123 extra_args,
135124 }
@@ -235,12 +224,10 @@ impl ClientWrapper {
235224
236225 fn required_command_arguments ( & self ) -> impl Iterator < Item = Cow < ' _ , str > > + ' _ {
237226 [
238- "--wallet" . into ( ) ,
239- self . wallet . as_str ( ) . into ( ) ,
240- "--keystore" . into ( ) ,
241- self . keystore . as_str ( ) . into ( ) ,
242- "--storage" . into ( ) ,
243- self . storage . as_str ( ) . into ( ) ,
227+ "--home-directory" . into ( ) ,
228+ self . path_provider . path ( ) . display ( ) . to_string ( ) . into ( ) ,
229+ "--with-wallet" . into ( ) ,
230+ self . wallet_id . to_string ( ) . into ( ) ,
244231 "--send-timeout-ms" . into ( ) ,
245232 "500000" . into ( ) ,
246233 "--recv-timeout-ms" . into ( ) ,
@@ -974,15 +961,17 @@ impl ClientWrapper {
974961 }
975962
976963 pub fn wallet_path ( & self ) -> PathBuf {
977- self . path_provider . path ( ) . join ( & self . wallet )
964+ self . path_provider
965+ . path ( )
966+ . join ( self . wallet_id . to_string ( ) )
967+ . join ( "wallet.json" )
978968 }
979969
980970 pub fn keystore_path ( & self ) -> PathBuf {
981- self . path_provider . path ( ) . join ( & self . keystore )
982- }
983-
984- pub fn storage_path ( & self ) -> & str {
985- & self . storage
971+ self . path_provider
972+ . path ( )
973+ . join ( self . wallet_id . to_string ( ) )
974+ . join ( "keystore.json" )
986975 }
987976
988977 pub fn get_owner ( & self ) -> Option < AccountOwner > {
0 commit comments