@@ -264,7 +264,7 @@ pub(crate) fn setup_two_nodes(
264264) -> ( TestNode , TestNode ) {
265265 println ! ( "== Node A ==" ) ;
266266 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 ) ;
268268
269269 println ! ( "\n == Node B ==" ) ;
270270 let mut config_b = random_config ( anchor_channels) ;
@@ -279,11 +279,13 @@ pub(crate) fn setup_two_nodes(
279279 . trusted_peers_no_reserve
280280 . push ( node_a. node_id ( ) ) ;
281281 }
282- let node_b = setup_node ( chain_source, config_b) ;
282+ let node_b = setup_node ( chain_source, config_b, None ) ;
283283 ( node_a, node_b)
284284}
285285
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 {
287289 setup_builder ! ( builder, config) ;
288290 match chain_source {
289291 TestChainSource :: Esplora ( electrsd) => {
@@ -302,6 +304,11 @@ pub(crate) fn setup_node(chain_source: &TestChainSource, config: Config) -> Test
302304 builder. set_chain_source_bitcoind_rpc ( rpc_host, rpc_port, rpc_user, rpc_password) ;
303305 } ,
304306 }
307+
308+ if let Some ( seed) = seed_bytes {
309+ builder. set_entropy_seed_bytes ( seed) . unwrap ( ) ;
310+ }
311+
305312 let test_sync_store = Arc :: new ( TestSyncStore :: new ( config. storage_dir_path . into ( ) ) ) ;
306313 let node = builder. build_with_store ( test_sync_store) . unwrap ( ) ;
307314 node. start ( ) . unwrap ( ) ;
0 commit comments