Expose total votes in voteplanstatus
@@ -428,6 +428,7 @@ pub struct VoteProposalStatus {
pub proposal_id: Hash,
pub options: Range<u8>,
pub tally: Option<Tally>,
+ pub total_votes: usize,
pub votes: HashMap<AccountIdentifier, Payload>,
}
@@ -523,6 +524,7 @@ impl From<vote::VoteProposalStatus> for VoteProposalStatus {
proposal_id: this.proposal_id.into(),
options: this.options.choice_range().clone(),
tally: this.tally.map(|t| t.into()),
+ total_votes: this.votes.size(),
votes: this
.votes
.iter()
