Add a optional json dump state to evm-bin (#9706)
* Add a dump of the state at the end of transaction for --json-test. Also fixes json-test output on finish, and allow to put both on err or out (--out-only and --err-only). * Dump state resolution from trie, function behind evm-bin feature to avoid misuse. * Rename 'slow' method to 'to_pod_full'. Use cache first in 'to_pod_full', for in between commits case. Change dump activation to use a function pointer instead. * Fix tests. * Query and add storage values to dump. * Switch to use `require` method, even if less efficient it is better in this case to reuse existing code. Reuse of `storage_at` was not easy in this case (could not iterate and use the method at the same time (refcell mutable borrow panics) so keeping code as is. * Switch to returning error. Use 'base_storage_root' instead of 'storage_root'. Added a test, it will only execute with json-test in ci, or when launch with the feature. * Renaming of command line parameters. Comments fixes. Minor code changes. * Fix evmbin cmd parsing test. * README update. * Fix extra space and avoid clone call on copiable address. * Revert test submodule. * Revert wasm-test submodule. * Use map_or instead of map + unwrap_or * restore tests submodule
This commit is contained in:
@@ -95,7 +95,7 @@ pub fn json_chain_test<H: FnMut(&str, HookType)>(json_data: &[u8], start_stop_ho
|
||||
flushln!("{} fail", info);
|
||||
failed.push(name.clone());
|
||||
},
|
||||
Ok(TransactResult::Err { state_root, ref error }) if state_root != post_root => {
|
||||
Ok(TransactResult::Err { state_root, ref error, .. }) if state_root != post_root => {
|
||||
println!("{} !!! State mismatch (got: {}, expect: {}", info, state_root, post_root);
|
||||
println!("{} !!! Execution error: {:?}", info, error);
|
||||
flushln!("{} fail", info);
|
||||
|
||||
Reference in New Issue
Block a user