@@ -12,7 +12,7 @@ use super::{
12
12
traits:: { LogProvider , LogProviderErased , NodeT } ,
13
13
Result ,
14
14
} ;
15
- use crate :: { batch_prover:: BatchProver , utils:: tail_file} ;
15
+ use crate :: { batch_prover:: BatchProver , light_client_prover :: LightClientProver , utils:: tail_file} ;
16
16
17
17
pub struct TestContext {
18
18
pub config : TestConfig ,
@@ -38,6 +38,7 @@ pub struct TestFramework {
38
38
pub bitcoin_nodes : BitcoinNodeCluster ,
39
39
pub sequencer : Option < Sequencer > ,
40
40
pub batch_prover : Option < BatchProver > ,
41
+ pub light_client_prover : Option < LightClientProver > ,
41
42
pub full_node : Option < FullNode > ,
42
43
show_logs : bool ,
43
44
pub initial_da_height : u64 ,
@@ -67,6 +68,7 @@ impl TestFramework {
67
68
bitcoin_nodes,
68
69
sequencer : None ,
69
70
batch_prover : None ,
71
+ light_client_prover : None ,
70
72
full_node : None ,
71
73
ctx,
72
74
show_logs : true ,
@@ -82,11 +84,15 @@ impl TestFramework {
82
84
)
83
85
. await ?;
84
86
85
- ( self . batch_prover , self . full_node ) = tokio:: try_join!(
87
+ ( self . batch_prover , self . light_client_prover , self . full_node ) = tokio:: try_join!(
86
88
create_optional(
87
89
self . ctx. config. test_case. with_batch_prover,
88
90
BatchProver :: new( & self . ctx. config. batch_prover)
89
91
) ,
92
+ create_optional(
93
+ self . ctx. config. test_case. with_light_client_prover,
94
+ LightClientProver :: new( & self . ctx. config. light_client_prover)
95
+ ) ,
90
96
create_optional(
91
97
self . ctx. config. test_case. with_full_node,
92
98
FullNode :: new( & self . ctx. config. full_node)
@@ -102,6 +108,9 @@ impl TestFramework {
102
108
self . sequencer. as_ref( ) . map( LogProvider :: as_erased) ,
103
109
self . full_node. as_ref( ) . map( LogProvider :: as_erased) ,
104
110
self . batch_prover. as_ref( ) . map( LogProvider :: as_erased) ,
111
+ self . light_client_prover
112
+ . as_ref( )
113
+ . map( LogProvider :: as_erased) ,
105
114
]
106
115
. into_iter ( )
107
116
. flatten ( )
@@ -154,6 +163,11 @@ impl TestFramework {
154
163
println ! ( "Successfully stopped batch_prover" ) ;
155
164
}
156
165
166
+ if let Some ( light_client_prover) = & mut self . light_client_prover {
167
+ let _ = light_client_prover. stop ( ) . await ;
168
+ println ! ( "Successfully stopped light_client_prover" ) ;
169
+ }
170
+
157
171
if let Some ( full_node) = & mut self . full_node {
158
172
let _ = full_node. stop ( ) . await ;
159
173
println ! ( "Successfully stopped full_node" ) ;
@@ -177,6 +191,14 @@ impl TestFramework {
177
191
. await ?;
178
192
da. create_wallet ( & NodeKind :: BatchProver . to_string ( ) , None , None , None , None )
179
193
. await ?;
194
+ da. create_wallet (
195
+ & NodeKind :: LightClientProver . to_string ( ) ,
196
+ None ,
197
+ None ,
198
+ None ,
199
+ None ,
200
+ )
201
+ . await ?;
180
202
da. create_wallet ( & NodeKind :: Bitcoin . to_string ( ) , None , None , None , None )
181
203
. await ?;
182
204
@@ -191,6 +213,12 @@ impl TestFramework {
191
213
da. fund_wallet ( NodeKind :: BatchProver . to_string ( ) , blocks_to_fund)
192
214
. await ?;
193
215
}
216
+
217
+ if self . ctx . config . test_case . with_light_client_prover {
218
+ da. fund_wallet ( NodeKind :: LightClientProver . to_string ( ) , blocks_to_fund)
219
+ . await ?;
220
+ }
221
+
194
222
da. fund_wallet ( NodeKind :: Bitcoin . to_string ( ) , blocks_to_fund)
195
223
. await ?;
196
224
0 commit comments