mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 13:27:57 +00:00
Further improved availability recovery (#3711)
* WiP. * Things compile. * cargo fmt * Passing tests + fix warnings. * Metrics for availability recovery. * Basic test. * Fix typos and actually check for overflow. * cargo fmt * Register metrics. * More tests. * Fix warning. * cargo +nightly fmt * Fix metrics * Get rid of unsafe. * tabify * spellcheck Co-authored-by: Andronik Ordian <write@reusable.software> Co-authored-by: Bastian Köcher <info@kchr.de>
This commit is contained in:
@@ -304,6 +304,13 @@ impl Proof {
|
||||
pub fn as_vec(&self) -> Vec<Vec<u8>> {
|
||||
self.0.as_vec().iter().map(|v| v.as_vec().clone()).collect()
|
||||
}
|
||||
|
||||
/// Construct an invalid dummy proof
|
||||
///
|
||||
/// Useful for testing, should absolutely not be used in production.
|
||||
pub fn dummy_proof() -> Proof {
|
||||
Proof(BoundedVec::from_vec(vec![BoundedVec::from_vec(vec![0]).unwrap()]).unwrap())
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(thiserror::Error, Debug)]
|
||||
|
||||
Reference in New Issue
Block a user