Skip to content
This repository has been archived by the owner on Mar 13, 2023. It is now read-only.

Commit

Permalink
[WIP] update crate info
Browse files Browse the repository at this point in the history
  • Loading branch information
boundless-forest committed Oct 19, 2020
1 parent dcfe0fd commit a873924
Show file tree
Hide file tree
Showing 18 changed files with 203 additions and 197 deletions.
246 changes: 123 additions & 123 deletions Cargo.lock

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

8 changes: 4 additions & 4 deletions bin/node-template/node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,11 @@ sp-transaction-pool = { git = "https://github.com/darwini
sp-trie = { features = ["memory-tracker"], git = "https://github.com/darwinia-network/substrate.git", branch = "common-library" }
substrate-frame-rpc-system = { git = "https://github.com/darwinia-network/substrate.git", branch = "common-library" }
substrate-prometheus-endpoint = { git = "https://github.com/darwinia-network/substrate.git", branch = "common-library" }
# frontier
# dvm
evm = { default-features = false, package = "pallet-evm", git = "https://github.com/darwinia-network/substrate.git", branch = "common-library" }
frontier-rpc = { default-features = false, path = "../../../frame/dvm/rpc" }
frontier-consensus = { path = "../../../frame/dvm/consensus" }
frontier-rpc-primitives = { default-features = false, path = "../../../frame/dvm/rpc/primitives" }
dvm-rpc = { default-features = false, path = "../../../frame/dvm/rpc" }
dvm-consensus = { path = "../../../frame/dvm/consensus" }
dvm-rpc-primitives = { default-features = false, path = "../../../frame/dvm/rpc/primitives" }

[build-dependencies]
# substrate
Expand Down
2 changes: 1 addition & 1 deletion bin/node-template/node/src/chain_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ fn testnet_genesis(
backed_ring: 1 << 56,
backed_kton: 1 << 56,
}),
// frontier
// dvm
frame_evm: Some(EVMConfig {
accounts: evm_accounts,
}),
Expand Down
6 changes: 3 additions & 3 deletions bin/node-template/node/src/rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ use node_template_runtime::{
opaque::Block,
primitives::{AccountId, Balance, BlockNumber, Hash, Nonce, Power},
};
// frontier
use frontier_rpc::{EthApi, EthApiServer, EthPubSubApi, EthPubSubApiServer, NetApi, NetApiServer};
// dvm
use dvm_rpc::{EthApi, EthApiServer, EthPubSubApi, EthPubSubApiServer, NetApi, NetApiServer};
use sc_client_api::{
backend::{AuxStore, Backend, StateBackend, StorageProvider},
client::BlockchainEvents,
Expand Down Expand Up @@ -118,7 +118,7 @@ where
P: 'static + sp_transaction_pool::TransactionPool,
<C::Api as sp_api::ApiErrorExt>::Error: fmt::Debug,
P: sp_transaction_pool::TransactionPool<Block = Block> + Sync + Send + 'static,
C::Api: frontier_rpc_primitives::EthereumRuntimeRPCApi<Block>,
C::Api: dvm_rpc_primitives::EthereumRuntimeRPCApi<Block>,
SC: 'static + sp_consensus::SelectChain<Block>,
B: 'static + Send + Sync + sc_client_api::Backend<Block>,
B::State: sc_client_api::StateBackend<sp_runtime::traits::HashFor<Block>>,
Expand Down
16 changes: 8 additions & 8 deletions bin/node-template/node/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ use sp_trie::PrefixedMemoryDB;
use substrate_prometheus_endpoint::Registry;
// --- darwinia ---
use crate::rpc::{self, BabeDeps, FullDeps, GrandpaDeps, LightDeps};
// frontier
use frontier_consensus::FrontierBlockImport;
// dvm
use dvm_consensus::FrontierBlockImport as DvmBlockImport;

use node_template_runtime::{
opaque::Block,
Expand Down Expand Up @@ -78,7 +78,7 @@ pub trait RuntimeApiCollection:
+ darwinia_balances_rpc_runtime_api::BalancesApi<Block, AccountId, Balance>
+ darwinia_header_mmr_rpc_runtime_api::HeaderMMRApi<Block, Hash>
+ darwinia_staking_rpc_runtime_api::StakingApi<Block, AccountId, Power>
+ frontier_rpc_primitives::EthereumRuntimeRPCApi<Block>
+ dvm_rpc_primitives::EthereumRuntimeRPCApi<Block>
where
<Self as sp_api::ApiExt<Block>>::StateBackend: sp_api::StateBackend<BlakeTwo256>,
{
Expand All @@ -99,7 +99,7 @@ where
+ darwinia_balances_rpc_runtime_api::BalancesApi<Block, AccountId, Balance>
+ darwinia_header_mmr_rpc_runtime_api::HeaderMMRApi<Block, Hash>
+ darwinia_staking_rpc_runtime_api::StakingApi<Block, AccountId, Power>
+ frontier_rpc_primitives::EthereumRuntimeRPCApi<Block>,
+ dvm_rpc_primitives::EthereumRuntimeRPCApi<Block>,
<Self as sp_api::ApiExt<Block>>::StateBackend: sp_api::StateBackend<BlakeTwo256>,
{
}
Expand Down Expand Up @@ -158,7 +158,7 @@ fn new_partial<RuntimeApi, Executor>(
BabeBlockImport<
Block,
FullClient<RuntimeApi, Executor>,
FrontierBlockImport<
DvmBlockImport<
Block,
FullGrandpaBlockImport<RuntimeApi, Executor>,
FullClient<RuntimeApi, Executor>,
Expand Down Expand Up @@ -204,11 +204,11 @@ where
grandpa_hard_forks,
)?;
let justification_import = grandpa_block_import.clone();
let frontier_block_import =
FrontierBlockImport::new(grandpa_block_import.clone(), client.clone(), true);
let dvm_block_import =
dvmBlockImport::new(grandpa_block_import.clone(), client.clone(), true);
let (babe_import, babe_link) = sc_consensus_babe::block_import(
BabeConfig::get_or_compute(&*client)?,
frontier_block_import,
dvm_block_import,
client.clone(),
)?;
let import_queue = sc_consensus_babe::import_queue(
Expand Down
Loading

0 comments on commit a873924

Please sign in to comment.