Add clone and copy to CoverTrafficSettings (#911)
* Add clone and copy to CoverTrafficSettings * Make settings fields public.
This commit is contained in:
parent
727b838042
commit
1c62ced9ea
|
@ -15,6 +15,7 @@ store.*
|
||||||
sim_config.json
|
sim_config.json
|
||||||
*.txt
|
*.txt
|
||||||
.env
|
.env
|
||||||
|
.idea/
|
||||||
|
|
||||||
# Integration test temp dirs
|
# Integration test temp dirs
|
||||||
tests/.tmp*
|
tests/.tmp*
|
||||||
|
|
|
@ -8,12 +8,14 @@ use std::ops::{DerefMut, Div};
|
||||||
use std::pin::Pin;
|
use std::pin::Pin;
|
||||||
use std::task::{Context, Poll};
|
use std::task::{Context, Poll};
|
||||||
|
|
||||||
|
#[derive(Copy, Clone)]
|
||||||
pub struct CoverTrafficSettings {
|
pub struct CoverTrafficSettings {
|
||||||
node_id: [u8; 32],
|
pub node_id: [u8; 32],
|
||||||
number_of_hops: usize,
|
pub number_of_hops: usize,
|
||||||
slots_per_epoch: usize,
|
pub slots_per_epoch: usize,
|
||||||
network_size: usize,
|
pub network_size: usize,
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct CoverTraffic<EpochStream, SlotStream, Message> {
|
pub struct CoverTraffic<EpochStream, SlotStream, Message> {
|
||||||
winning_probability: f64,
|
winning_probability: f64,
|
||||||
settings: CoverTrafficSettings,
|
settings: CoverTrafficSettings,
|
||||||
|
|
Loading…
Reference in New Issue