drive/state_transition_action/identity/masternode_vote/v0/
mod.rs

1mod transformer;
2
3use crate::drive::votes::resolved::votes::ResolvedVote;
4use dpp::platform_value::Identifier;
5use dpp::prelude::IdentityNonce;
6use dpp::voting::vote_choices::resource_vote_choice::ResourceVoteChoice;
7
8/// The previous vote count
9pub type PreviousVoteCount = u16;
10
11/// action v0
12#[derive(Debug, Clone)]
13pub struct MasternodeVoteTransitionActionV0 {
14    /// the pro tx hash identifier of the masternode
15    pub pro_tx_hash: Identifier,
16    /// The voter identity id is made by hashing the pro_tx_hash and the voting address
17    pub voter_identity_id: Identifier,
18    /// The voting address used
19    pub voting_address: [u8; 20],
20    /// masternode type vote strength, masternodes have 1, evonodes have 4
21    pub vote_strength: u8,
22    /// the resource votes
23    pub vote: ResolvedVote,
24    /// vote choice to remove
25    pub previous_resource_vote_choice_to_remove: Option<(ResourceVoteChoice, PreviousVoteCount)>,
26    /// nonce
27    pub nonce: IdentityNonce,
28}