pub fn new(
        function: T,
        height: u64,
        round: u64,
        authority_list: Vec<Address>,
        db_path: &str,
    ) -> Self {
        Actuator {
            function,
            height,
            round,
            lock_round: None,
            lock_votes: Vec::new(),
            lock_proposal: None,
            authority_list,
            proposal: Vec::new(),
            byzantine: byzantine_proposal(),
            sleep_ms: 150,
            storage: Storage::new(db_path),
            vote_cache: VoteCache::new(),
            proposal_cache: ProposalCache::new(),
            msg_cache: HashSet::new(),
            stime: Instant::now(),
            htime: Timespec::new(0, 0),
        }
    }
/// A function to create a new testing acutator. The `height` is the initial height
/// and the `round` is the initial round. The `authority_list` should be a `Vec` with
/// length 4. The first one in authority list should be the address of the testing
/// node. The `db_path` is the path of database.
A function to create a new testing acutator. The `height` is the initial height
and the `round` is the initial round. The `authority_list` should be a `Vec` with
length 4. The first one in authority list should be the address of the testing
node. The `db_path` is the path of database.
A function to create a new testing acutator . The ` height ` is the initial height and the ` round ` is the initial round . The ` authority_list ` should be a ` Vec ` with length 4 . The first one in authority list should be the address of the testing node . The ` db_path ` is the path of database .
pub fn new(
        function: T,
        height: u64,
        round: u64,
        authority_list: Vec<Address>,
        db_path: &str,
    ) -> Self {
        Actuator {
            function,
            height,
            round,
            lock_round: None,
            lock_votes: Vec::new(),
            lock_proposal: None,
            authority_list,
            proposal: Vec::new(),
            byzantine: byzantine_proposal(),
            sleep_ms: 150,
            storage: Storage::new(db_path),
            vote_cache: VoteCache::new(),
            proposal_cache: ProposalCache::new(),
            msg_cache: HashSet::new(),
            stime: Instant::now(),
            htime: Timespec::new(0, 0),
        }
    }
pub fn new ( function : T , height : u64 , round : u64 , authority_list : Vec < Address > , db_path : & str , ) -> Self { Actuator { function , height , round , lock_round : None , lock_votes : Vec :: new ( ) , lock_proposal : None , authority_list , proposal : Vec :: new ( ) , byzantine : byzantine_proposal ( ) , sleep_ms : 150 , storage : Storage :: new ( db_path ) , vote_cache : VoteCache :: new ( ) , proposal_cache : ProposalCache :: new ( ) , msg_cache : HashSet :: new ( ) , stime : Instant :: now ( ) , htime : Timespec :: new ( 0 , 0 ) , } }
A function to create a new testing acutator.
A function to create a new testing acutator .
function
T
height
u64
round
u64
authority_list
Vec<Address>
db_path
&str