mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-01 14:47:55 +00:00
allow try-runtime and TestExternalities to report PoV size (#10372)
* allow try-runtime and test-externalities to report proof size * self review * fix test * Fix humanized dispaly of bytes * Fix some test * Fix some review grumbles * last of the review comments * fmt * remove unused import * move test * fix import * Update primitives/state-machine/src/testing.rs Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> * last touches * fix Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
This commit is contained in:
@@ -221,6 +221,11 @@ where
|
||||
pub fn estimate_encoded_size(&self) -> usize {
|
||||
self.0.essence().backend_storage().proof_recorder.estimate_encoded_size()
|
||||
}
|
||||
|
||||
/// Clear the proof recorded data.
|
||||
pub fn clear_recorder(&self) {
|
||||
self.0.essence().backend_storage().proof_recorder.reset()
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a, S: 'a + TrieBackendStorage<H>, H: 'a + Hasher> TrieBackendStorage<H>
|
||||
@@ -358,7 +363,9 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
/// Create proof check backend.
|
||||
/// Create a backend used for checking the proof., using `H` as hasher.
|
||||
///
|
||||
/// `proof` and `root` must match, i.e. `root` must be the correct root of `proof` nodes.
|
||||
pub fn create_proof_check_backend<H>(
|
||||
root: H::Out,
|
||||
proof: StorageProof,
|
||||
|
||||
Reference in New Issue
Block a user