Create opaque struct for StorageProof. (#3834)

Passing around Vec<Vec<u8>> everywhere is gross and confusing and
breaks encapsulation.
This commit is contained in:
Jim Posen
2019-10-31 11:02:29 +01:00
committed by Bastian Köcher
parent 073040a053
commit a167f37b91
20 changed files with 246 additions and 141 deletions
+2 -2
View File
@@ -18,7 +18,7 @@
#[doc(hidden)]
#[cfg(feature = "std")]
pub use state_machine::OverlayedChanges;
pub use state_machine::{OverlayedChanges, StorageProof};
#[doc(hidden)]
#[cfg(feature = "std")]
pub use primitives::NativeOrEncoded;
@@ -106,7 +106,7 @@ pub trait ApiExt<Block: BlockT> {
/// Extract the recorded proof.
/// This stops the proof recording.
fn extract_proof(&mut self) -> Option<Vec<Vec<u8>>>;
fn extract_proof(&mut self) -> Option<StorageProof>;
}
/// Before calling any runtime api function, the runtime need to be initialized