Improve remote-externalities (#8397)
* make builder generic to allow using different hash types * expose "cache", "block_number" and "modules" as cli options for live state * Change Builder to be generic over Block instead of Hash add rpc method to get hash from block number allow passing of block numbers and hashes * fix live tests * fix formatting in utils/frame/remote-externalities/src/lib.rs Co-authored-by:Kian Paimani <5588131+kianenigma@users.noreply.github.com> * change cli to only accept block hashes break up lines that were too long use starts_with instead of match s.get use unwrap_or_default instead of unwrap_or(Vec::new()) * improve error message * fix indentation * replace Block with sp_runtime::testing::Block * Move cache test out of remote-test feature tests Add cache file (contains only "Proxy" module) for local test * simplify match expression to and_then Co-authored-by:
Kian Paimani <5588131+kianenigma@users.noreply.github.com> * Combine the two cfg attributes into one Co-authored-by:
David <dvdplm@gmail.com> * Restrict visibility of test_prelude use statements to crate level * Fix usage of and_then * Rename cache to snapshot * Remove fully qualified path for Debug * Refine naming. snapshot to state_snapshot * Remove unnecessary comment Co-authored-by:
Kian Paimani <5588131+kianenigma@users.noreply.github.com> Co-authored-by:
Kian Paimani <5588131+kianenigma@users.noreply.github.com> Co-authored-by:
David <dvdplm@gmail.com>
Showing
- substrate/Cargo.lock 2 additions, 1 deletionsubstrate/Cargo.lock
- substrate/utils/frame/remote-externalities/Cargo.toml 2 additions, 1 deletionsubstrate/utils/frame/remote-externalities/Cargo.toml
- substrate/utils/frame/remote-externalities/src/lib.rs 95 additions, 78 deletionssubstrate/utils/frame/remote-externalities/src/lib.rs
- substrate/utils/frame/remote-externalities/test_data/proxy_test 0 additions, 0 deletions...ate/utils/frame/remote-externalities/test_data/proxy_test
- substrate/utils/frame/try-runtime/cli/src/lib.rs 106 additions, 28 deletionssubstrate/utils/frame/try-runtime/cli/src/lib.rs
Please register or sign in to comment