Skip to content

Commit 56477a7

Browse files
authored
fix: pending runtime api for pending state (#1160) (#1195)
* fix: pending runtime api for pending state (#1160) * enable integration tests about pending api
1 parent b5d1092 commit 56477a7

23 files changed

Lines changed: 480 additions & 237 deletions

Cargo.lock

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/rpc/Cargo.toml

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,13 @@ rlp = { workspace = true }
2525
scale-codec = { package = "parity-scale-codec", workspace = true }
2626
schnellru = "0.2.1"
2727
serde = { workspace = true }
28+
thiserror = { workspace = true }
2829
tokio = { workspace = true, features = ["sync"] }
2930

3031
# Substrate
3132
prometheus-endpoint = { workspace = true }
3233
sc-client-api = { workspace = true }
34+
sc-consensus-aura = { workspace = true }
3335
sc-network = { workspace = true }
3436
sc-network-common = { workspace = true }
3537
sc-network-sync = { workspace = true }
@@ -38,24 +40,27 @@ sc-service = { workspace = true }
3840
sc-transaction-pool = { workspace = true }
3941
sc-transaction-pool-api = { workspace = true }
4042
sc-utils = { workspace = true }
41-
sp-api = { workspace = true }
42-
sp-block-builder = { workspace = true }
43+
sp-api = { workspace = true, features = ["default"] }
44+
sp-block-builder = { workspace = true, features = ["default"] }
4345
sp-blockchain = { workspace = true }
4446
sp-consensus = { workspace = true }
45-
sp-core = { workspace = true }
46-
sp-io = { workspace = true }
47-
sp-runtime = { workspace = true }
48-
sp-state-machine = { workspace = true }
49-
sp-storage = { workspace = true }
47+
sp-consensus-aura = { workspace = true, features = ["default"] }
48+
sp-core = { workspace = true, features = ["default"] }
49+
sp-inherents = { workspace = true, features = ["default"] }
50+
sp-io = { workspace = true, features = ["default"] }
51+
sp-runtime = { workspace = true, features = ["default"] }
52+
sp-state-machine = { workspace = true, features = ["default"] }
53+
sp-storage = { workspace = true, features = ["default"] }
54+
sp-timestamp = { workspace = true, features = ["default"] }
5055
# Frontier
5156
fc-api = { workspace = true }
5257
fc-mapping-sync = { workspace = true }
5358
fc-rpc-core = { workspace = true }
5459
fc-storage = { workspace = true }
55-
fp-evm = { workspace = true }
60+
fp-evm = { workspace = true, features = ["default"] }
5661
fp-rpc = { workspace = true, features = ["default"] }
5762
fp-storage = { workspace = true, features = ["default"] }
58-
pallet-evm = { workspace = true }
63+
pallet-evm = { workspace = true, features = ["default"] }
5964

6065
[dev-dependencies]
6166
tempfile = "3.8.0"

client/rpc/src/eth/block.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,15 @@ use crate::{
3737
frontier_backend_client, internal_err,
3838
};
3939

40-
impl<B, C, P, CT, BE, A: ChainApi, EC: EthConfig<B, C>> Eth<B, C, P, CT, BE, A, EC>
40+
impl<B, C, P, CT, BE, A, CIDP, EC> Eth<B, C, P, CT, BE, A, CIDP, EC>
4141
where
4242
B: BlockT,
4343
C: ProvideRuntimeApi<B>,
4444
C::Api: EthereumRuntimeRPCApi<B>,
4545
C: HeaderBackend<B> + StorageProvider<B, BE> + 'static,
4646
BE: Backend<B> + 'static,
47-
A: ChainApi<Block = B> + 'static,
47+
A: ChainApi<Block = B>,
48+
EC: EthConfig<B, C>,
4849
{
4950
pub async fn block_by_hash(&self, hash: H256, full: bool) -> RpcResult<Option<RichBlock>> {
5051
let BlockInfo {

client/rpc/src/eth/client.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,15 @@ use crate::{
3434
internal_err,
3535
};
3636

37-
impl<B, C, P, CT, BE, A: ChainApi, EC: EthConfig<B, C>> Eth<B, C, P, CT, BE, A, EC>
37+
impl<B, C, P, CT, BE, A, CIDP, EC> Eth<B, C, P, CT, BE, A, CIDP, EC>
3838
where
3939
B: BlockT,
4040
C: ProvideRuntimeApi<B>,
4141
C::Api: EthereumRuntimeRPCApi<B>,
4242
C: HeaderBackend<B> + StorageProvider<B, BE> + 'static,
4343
BE: Backend<B>,
44+
A: ChainApi<Block = B>,
45+
EC: EthConfig<B, C>,
4446
{
4547
pub fn protocol_version(&self) -> RpcResult<u64> {
4648
Ok(1)

0 commit comments

Comments
 (0)