mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 12:51:05 +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:
@@ -254,7 +254,7 @@ fn make_erasure_root(test: &TestState, pov: PoV) -> Hash {
|
||||
|
||||
fn make_valid_availability_gossip(
|
||||
test: &TestState,
|
||||
candidate_hash: Hash,
|
||||
candidate_hash: CandidateHash,
|
||||
erasure_chunk_index: u32,
|
||||
pov: PoV,
|
||||
) -> AvailabilityGossipMessage {
|
||||
@@ -320,7 +320,7 @@ fn helper_integrity() {
|
||||
.build();
|
||||
|
||||
let message =
|
||||
make_valid_availability_gossip(&test_state, dbg!(candidate.hash()), 2, pov_block.clone());
|
||||
make_valid_availability_gossip(&test_state, candidate.hash(), 2, pov_block.clone());
|
||||
|
||||
let root = dbg!(&candidate.commitments.erasure_root);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user