diff --git a/grin/src/lib.rs b/grin/src/lib.rs index 51a6243cb..fb53bd584 100644 --- a/grin/src/lib.rs +++ b/grin/src/lib.rs @@ -52,4 +52,4 @@ mod sync; mod types; pub use server::Server; -pub use types::{ServerConfig, Seeding}; +pub use types::{ServerConfig, MinerConfig, Seeding}; diff --git a/grin/tests/simulnet.rs b/grin/tests/simulnet.rs index 6d23318b4..2858994f7 100644 --- a/grin/tests/simulnet.rs +++ b/grin/tests/simulnet.rs @@ -41,6 +41,12 @@ fn simulate_block_propagation() { let mut evtlp = reactor::Core::new().unwrap(); let handle = evtlp.handle(); + let miner_config = grin::MinerConfig{ + enable_mining: true, + burn_reward: true, + ..Default::default() + }; + // instantiates 5 servers on different ports let mut servers = vec![]; for n in 0..5 { @@ -64,7 +70,7 @@ fn simulate_block_propagation() { } // start mining - servers[0].start_miner(); + servers[0].start_miner(miner_config); let original_height = servers[0].head().height; // monitor for a change of head on a different server and check whether @@ -84,6 +90,12 @@ fn simulate_full_sync() { let mut evtlp = reactor::Core::new().unwrap(); let handle = evtlp.handle(); + let miner_config = grin::MinerConfig{ + enable_mining: true, + burn_reward: true, + ..Default::default() + }; + // instantiates 2 servers on different ports let mut servers = vec![]; for n in 0..2 { @@ -98,7 +110,7 @@ fn simulate_full_sync() { } // mine a few blocks on server 1 - servers[0].start_miner(); + servers[0].start_miner(miner_config); thread::sleep(time::Duration::from_secs(15)); // connect 1 and 2