mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 01:41:09 +00:00
Make CandidateHash a real type (#1916)
* Make `CandidateHash` a real type This pr adds a new type `CandidateHash` that is used instead of the opaque `Hash` type. This helps to ensure on the type system level that we are passing the correct types. This pr also fixes wrong usage of `relay_parent` as `candidate_hash` when communicating with the av storage. * Update core-primitives/src/lib.rs Co-authored-by: Peter Goodspeed-Niklaus <coriolinus@users.noreply.github.com> * Wrap the lines Co-authored-by: Peter Goodspeed-Niklaus <coriolinus@users.noreply.github.com>
This commit is contained in:
@@ -28,7 +28,7 @@ use polkadot_primitives::v1::{
|
||||
Hash, CommittedCandidateReceipt, CandidateReceipt, CompactStatement,
|
||||
EncodeAs, Signed, SigningContext, ValidatorIndex, ValidatorId,
|
||||
UpwardMessage, ValidationCode, PersistedValidationData, ValidationData,
|
||||
HeadData, PoV, CollatorPair, Id as ParaId, ValidationOutputs,
|
||||
HeadData, PoV, CollatorPair, Id as ParaId, ValidationOutputs, CandidateHash,
|
||||
};
|
||||
use polkadot_statement_table::{
|
||||
generic::{
|
||||
@@ -54,10 +54,10 @@ pub enum Statement {
|
||||
Seconded(CommittedCandidateReceipt),
|
||||
/// A statement that a validator has deemed a candidate valid.
|
||||
#[codec(index = "2")]
|
||||
Valid(Hash),
|
||||
Valid(CandidateHash),
|
||||
/// A statement that a validator has deemed a candidate invalid.
|
||||
#[codec(index = "3")]
|
||||
Invalid(Hash),
|
||||
Invalid(CandidateHash),
|
||||
}
|
||||
|
||||
impl Statement {
|
||||
|
||||
Reference in New Issue
Block a user