Skip to content

Commit

Permalink
fix: pending runtime api for pending state (#1160)
Browse files Browse the repository at this point in the history
  • Loading branch information
koushiro authored Sep 13, 2023
1 parent b520b74 commit 301d7c0
Show file tree
Hide file tree
Showing 17 changed files with 480 additions and 217 deletions.
5 changes: 5 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 14 additions & 9 deletions client/rpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,13 @@ rlp = { workspace = true }
scale-codec = { package = "parity-scale-codec", workspace = true }
schnellru = "0.2.1"
serde = { workspace = true }
thiserror = { workspace = true }
tokio = { workspace = true, features = ["sync"] }

# Substrate
prometheus-endpoint = { workspace = true }
sc-client-api = { workspace = true }
sc-consensus-aura = { workspace = true }
sc-network = { workspace = true }
sc-network-common = { workspace = true }
sc-network-sync = { workspace = true }
Expand All @@ -38,25 +40,28 @@ sc-service = { workspace = true }
sc-transaction-pool = { workspace = true }
sc-transaction-pool-api = { workspace = true }
sc-utils = { workspace = true }
sp-api = { workspace = true }
sp-block-builder = { workspace = true }
sp-api = { workspace = true, features = ["default"] }
sp-block-builder = { workspace = true, features = ["default"] }
sp-blockchain = { workspace = true }
sp-consensus = { workspace = true }
sp-core = { workspace = true }
sp-io = { workspace = true }
sp-runtime = { workspace = true }
sp-state-machine = { workspace = true }
sp-storage = { workspace = true }
sp-consensus-aura = { workspace = true, features = ["default"] }
sp-core = { workspace = true, features = ["default"] }
sp-inherents = { workspace = true, features = ["default"] }
sp-io = { workspace = true, features = ["default"] }
sp-runtime = { workspace = true, features = ["default"] }
sp-state-machine = { workspace = true, features = ["default"] }
sp-storage = { workspace = true, features = ["default"] }
sp-timestamp = { workspace = true, features = ["default"] }
# Frontier
fc-db = { workspace = true }
fc-mapping-sync = { workspace = true }
fc-rpc-core = { workspace = true }
fc-storage = { workspace = true }
fp-ethereum = { workspace = true, features = ["default"] }
fp-evm = { workspace = true }
fp-evm = { workspace = true, features = ["default"] }
fp-rpc = { workspace = true, features = ["default"] }
fp-storage = { workspace = true, features = ["default"] }
pallet-evm = { workspace = true }
pallet-evm = { workspace = true, features = ["default"] }

[dev-dependencies]
tempfile = "3.3.0"
Expand Down
5 changes: 3 additions & 2 deletions client/rpc/src/eth/block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,15 @@ use crate::{
frontier_backend_client, internal_err,
};

impl<B, C, P, CT, BE, A: ChainApi, EC: EthConfig<B, C>> Eth<B, C, P, CT, BE, A, EC>
impl<B, C, P, CT, BE, A, CIDP, EC> Eth<B, C, P, CT, BE, A, CIDP, EC>
where
B: BlockT,
C: ProvideRuntimeApi<B>,
C::Api: EthereumRuntimeRPCApi<B>,
C: HeaderBackend<B> + StorageProvider<B, BE> + 'static,
BE: Backend<B>,
A: ChainApi<Block = B> + 'static,
A: ChainApi<Block = B>,
EC: EthConfig<B, C>,
{
pub async fn block_by_hash(&self, hash: H256, full: bool) -> RpcResult<Option<RichBlock>> {
let client = Arc::clone(&self.client);
Expand Down
4 changes: 3 additions & 1 deletion client/rpc/src/eth/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,15 @@ use crate::{
internal_err,
};

impl<B, C, P, CT, BE, A: ChainApi, EC: EthConfig<B, C>> Eth<B, C, P, CT, BE, A, EC>
impl<B, C, P, CT, BE, A, CIDP, EC> Eth<B, C, P, CT, BE, A, CIDP, EC>
where
B: BlockT,
C: ProvideRuntimeApi<B>,
C::Api: EthereumRuntimeRPCApi<B>,
C: HeaderBackend<B> + StorageProvider<B, BE> + 'static,
BE: Backend<B>,
A: ChainApi<Block = B>,
EC: EthConfig<B, C>,
{
pub fn protocol_version(&self) -> RpcResult<u64> {
Ok(1)
Expand Down
Loading

0 comments on commit 301d7c0

Please sign in to comment.