pub trait Certified {
type Value: CertificateValue;
// Required methods
fn value(&self) -> &Self::Value;
fn round(&self) -> Round;
fn unlocking_round(&self) -> Option<Round>;
fn signatures(&self) -> &Vec<(ValidatorPublicKey, ValidatorSignature)>;
fn lite_certificate(&self) -> LiteCertificate<'_>;
fn check(&self, committee: &Committee) -> Result<(), ChainError>;
// Provided methods
fn hash(&self) -> CryptoHash { ... }
fn is_signed_by(&self, validator_name: &ValidatorPublicKey) -> bool { ... }
}Expand description
The common read interface shared by all certificate types: the signed value, the round and unlocking round it was certified under, its signatures, and verification.
Required Associated Types§
Sourcetype Value: CertificateValue
type Value: CertificateValue
The kind of value this certificate certifies.
Required Methods§
Sourcefn unlocking_round(&self) -> Option<Round>
fn unlocking_round(&self) -> Option<Round>
Returns the unlocking round the ValidatedBlock voters signed, if any.
Sourcefn signatures(&self) -> &Vec<(ValidatorPublicKey, ValidatorSignature)>
fn signatures(&self) -> &Vec<(ValidatorPublicKey, ValidatorSignature)>
Returns the validator signatures certifying this value.
Sourcefn lite_certificate(&self) -> LiteCertificate<'_>
fn lite_certificate(&self) -> LiteCertificate<'_>
Returns the LiteCertificate corresponding to this certificate, without the value but
with the justification chain.
Provided Methods§
Sourcefn hash(&self) -> CryptoHash
fn hash(&self) -> CryptoHash
Returns the certified value’s hash.
Sourcefn is_signed_by(&self, validator_name: &ValidatorPublicKey) -> bool
fn is_signed_by(&self, validator_name: &ValidatorPublicKey) -> bool
Returns whether the validator is among the signatories of this certificate.