Function sp_state_machine::prove_execution_on_trie_backend
source · [−]pub fn prove_execution_on_trie_backend<S, H, Exec, Spawn>(
trie_backend: &TrieBackend<S, H>,
overlay: &mut OverlayedChanges,
exec: &Exec,
spawn_handle: Spawn,
method: &str,
call_data: &[u8],
runtime_code: &RuntimeCode<'_>
) -> Result<(Vec<u8>, StorageProof), Box<dyn Error>> where
S: TrieBackendStorage<H>,
H: Hasher,
H::Out: Ord + 'static + Codec,
Exec: CodeExecutor + 'static + Clone,
Spawn: SpawnNamed + Send + 'static,
Expand description
Prove execution using the given trie backend, overlayed changes, and call executor. Produces a state-backend-specific “transaction” which can be used to apply the changes to the backing store, such as the disk. Execution proof is the set of all ‘touched’ storage DBValues from the backend.
On an error, no prospective changes are written to the overlay.
Note: changes to code will be in place if this call is made again. For running partial blocks (e.g. a transaction at a time), ensure a different method is used.