Pass indices in serialized form (#318)

* Pass indices in serialized form

* Fix indentation and remove panic

* Fix tests and other code

* Remove unique voters tracking

* Restore validator group check

* Fix lock file

* Add test

* Add attestation sorting

* Add validation to the check_candidate function

* Update codec version one more time

* Remove patch versions
This commit is contained in:
Stanislav Tkach
2019-08-05 23:44:05 +03:00
committed by Gavin Wood
parent 4d5db52ca0
commit c660c31937
8 changed files with 167 additions and 91 deletions
+4 -1
View File
@@ -19,6 +19,7 @@
use rstd::prelude::*;
use rstd::cmp::Ordering;
use parity_codec::{Encode, Decode};
use bitvec::vec::BitVec;
use super::{Hash, Balance, BlockNumber};
#[cfg(feature = "std")]
@@ -305,7 +306,9 @@ pub struct AttestedCandidate {
/// The candidate data.
pub candidate: CandidateReceipt,
/// Validity attestations.
pub validity_votes: Vec<(ValidatorIndex, ValidityAttestation)>,
pub validity_votes: Vec<ValidityAttestation>,
/// Indices of the corresponding validity votes.
pub validator_indices: BitVec,
}
impl AttestedCandidate {