mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 23:57:56 +00:00
Add tests and modify as_vec implementation (#3715)
* Add tests and modify as_vec implementation * Address feedback * fix typo in test
This commit is contained in:
@@ -363,11 +363,9 @@ impl RequestChunksPhase {
|
||||
|
||||
let validator_index = chunk.index;
|
||||
|
||||
if let Ok(anticipated_hash) = branch_hash(
|
||||
¶ms.erasure_root,
|
||||
&chunk.proof_as_vec(),
|
||||
chunk.index.0 as usize,
|
||||
) {
|
||||
if let Ok(anticipated_hash) =
|
||||
branch_hash(¶ms.erasure_root, chunk.proof(), chunk.index.0 as usize)
|
||||
{
|
||||
let erasure_chunk_hash = BlakeTwo256::hash(&chunk.chunk);
|
||||
|
||||
if erasure_chunk_hash != anticipated_hash {
|
||||
|
||||
Reference in New Issue
Block a user