@@ -264,7 +264,7 @@ pub(crate) fn setup_two_nodes(
264
264
) -> ( TestNode , TestNode ) {
265
265
println ! ( "== Node A ==" ) ;
266
266
let config_a = random_config ( anchor_channels) ;
267
- let node_a = setup_node ( chain_source, config_a) ;
267
+ let node_a = setup_node ( chain_source, config_a, None ) ;
268
268
269
269
println ! ( "\n == Node B ==" ) ;
270
270
let mut config_b = random_config ( anchor_channels) ;
@@ -279,11 +279,13 @@ pub(crate) fn setup_two_nodes(
279
279
. trusted_peers_no_reserve
280
280
. push ( node_a. node_id ( ) ) ;
281
281
}
282
- let node_b = setup_node ( chain_source, config_b) ;
282
+ let node_b = setup_node ( chain_source, config_b, None ) ;
283
283
( node_a, node_b)
284
284
}
285
285
286
- pub ( crate ) fn setup_node ( chain_source : & TestChainSource , config : Config ) -> TestNode {
286
+ pub ( crate ) fn setup_node (
287
+ chain_source : & TestChainSource , config : Config , seed_bytes : Option < Vec < u8 > > ,
288
+ ) -> TestNode {
287
289
setup_builder ! ( builder, config) ;
288
290
match chain_source {
289
291
TestChainSource :: Esplora ( electrsd) => {
@@ -302,6 +304,11 @@ pub(crate) fn setup_node(chain_source: &TestChainSource, config: Config) -> Test
302
304
builder. set_chain_source_bitcoind_rpc ( rpc_host, rpc_port, rpc_user, rpc_password) ;
303
305
} ,
304
306
}
307
+
308
+ if let Some ( seed) = seed_bytes {
309
+ builder. set_entropy_seed_bytes ( seed) . unwrap ( ) ;
310
+ }
311
+
305
312
let test_sync_store = Arc :: new ( TestSyncStore :: new ( config. storage_dir_path . into ( ) ) ) ;
306
313
let node = builder. build_with_store ( test_sync_store) . unwrap ( ) ;
307
314
node. start ( ) . unwrap ( ) ;
0 commit comments