frame/utils: introduce substrate-rpc-client crate for RPC utils (#12212)

* hack together a PoC

* Update utils/frame/rpc-utils/Cargo.toml

Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>

* Update utils/frame/rpc-utils/src/lib.rs

Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>

* rpc_utils -> substrate_rpc_client

* try runtime: remove keep connection

* make CI happy

* cargo fmt

* fix ci

* update lock file

* fix

* fix

Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
Co-authored-by: kianenigma <kian@parity.io>
This commit is contained in:
Niklas Adolfsson
2022-10-18 18:39:19 +02:00
committed by GitHub
parent 096553cb59
commit e3b269ab0f
19 changed files with 437 additions and 497 deletions
@@ -1640,13 +1640,12 @@ pub(crate) mod remote_tests {
///
/// This will print some very useful statistics, make sure [`crate::LOG_TARGET`] is enabled.
#[allow(dead_code)]
pub(crate) async fn run_with_limits<
pub(crate) async fn run_with_limits<Runtime, Block>(limits: MigrationLimits, mode: Mode<Block>)
where
Runtime: crate::Config<Hash = H256>,
Block: BlockT<Hash = H256> + serde::de::DeserializeOwned,
>(
limits: MigrationLimits,
mode: Mode<Block>,
) {
Block: BlockT<Hash = H256>,
Block::Header: serde::de::DeserializeOwned,
{
let mut ext = remote_externalities::Builder::<Block>::new()
.mode(mode)
.state_version(sp_core::storage::StateVersion::V0)