Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
109 commits
Select commit Hold shift + click to select a range
45e0ee8
Genric over hasher
dvdplm Jul 11, 2018
eb26a69
WIP start adding NodeCodec
dvdplm Jul 11, 2018
acf8284
Add codec to TrieBackend
dvdplm Jul 11, 2018
90707dc
Typechecks
dvdplm Jul 11, 2018
4ccc851
Fix error type
dvdplm Jul 11, 2018
21b7892
Cleanup
dvdplm Jul 11, 2018
6b2fa02
Tests build (and fail)
dvdplm Jul 11, 2018
f331b0c
Fix tests: don't use MemoryDB::default()
dvdplm Jul 11, 2018
f0f2413
Lockfile
dvdplm Jul 11, 2018
87740d7
Address grumbles
dvdplm Jul 12, 2018
a34f614
Teach environmental! about generics
dvdplm Jul 12, 2018
c7503ad
Add Finder artifacts
dvdplm Jul 12, 2018
711da4f
whitespace
dvdplm Jul 12, 2018
a70f4a0
Merge branch 'refactor/environmental-generic-traits' into refactor/su…
dvdplm Jul 12, 2018
b4f210a
Add a toy impl of Hasher and plug it in to Externalities
dvdplm Jul 30, 2018
3b5f60b
Use `uint` and `fixed-hash` from `parity-common`
dvdplm Jul 30, 2018
1aeb495
lock file updates
dvdplm Jul 30, 2018
f7c30f4
Merge branch 'master' into refactor/substrate-state-machine-generic
dvdplm Jul 30, 2018
80c96a1
Make hashes Encodable/Decodable
dvdplm Jul 31, 2018
e3277ac
lock file updates
dvdplm Jul 31, 2018
d38216b
Impl FromIterator for TestExternalities so we can collect() and use map!
dvdplm Aug 1, 2018
5f19c7b
Use rustc-hex from crates
dvdplm Aug 1, 2018
848ce8f
Fix tests in runtime-io
dvdplm Aug 1, 2018
1358bb9
Merge branch 'master' into refactor/substrate-state-machine-generic
dvdplm Aug 1, 2018
9b8f417
lockfile shenanigans
dvdplm Aug 1, 2018
ca01909
Add a BlakeHasher impl
dvdplm Aug 1, 2018
9e42668
Use BlakeHasher in runtime-io
dvdplm Aug 1, 2018
0f77d2b
lockfile updates
dvdplm Aug 2, 2018
402c35c
ws
dvdplm Aug 2, 2018
85b5fe1
Add a Blake2/RLP-flavoured NodeCodec
dvdplm Aug 2, 2018
56649b6
Use Blake-flavoured Hasher and NodeCodec
dvdplm Aug 2, 2018
5e5e61e
lockfile
dvdplm Aug 2, 2018
fc14711
Implement PartialEq and Default for TestExternalities
dvdplm Aug 2, 2018
05d8200
Add note about limitations of environmental!
dvdplm Aug 2, 2018
65c4f64
Make it compile, but this is probably broken
dvdplm Aug 2, 2018
56f9ef6
Derive Debug so tests in executor can work
dvdplm Aug 2, 2018
eac3f25
Make executor use BlakeHasher
dvdplm Aug 2, 2018
f3422c5
ws
dvdplm Aug 3, 2018
aa40b78
WIP make client generic
dvdplm Aug 3, 2018
54a2b66
typechecks
dvdplm Aug 3, 2018
277aadd
cleanup
dvdplm Aug 3, 2018
02a302a
client tests pass
dvdplm Aug 3, 2018
dae069b
Fix client/db
dvdplm Aug 3, 2018
7a93cf7
cleanup
dvdplm Aug 3, 2018
6329abb
Fix network
dvdplm Aug 3, 2018
dc7fc67
Fix rpc
dvdplm Aug 3, 2018
d7c0935
Fix service
dvdplm Aug 3, 2018
a553f31
Make TestExternalities work better au lieu d'un HashMap
dvdplm Aug 3, 2018
9bfe799
Fix tests in council
dvdplm Aug 3, 2018
e4cefb3
Fix tests in contract
dvdplm Aug 3, 2018
6277110
Fix tests in council
dvdplm Aug 3, 2018
adc13a2
Fix democracy
dvdplm Aug 3, 2018
252bbd8
Add comment about odd-looking reexports in tests
dvdplm Aug 3, 2018
c94018c
Don't need to load branch
dvdplm Aug 3, 2018
c49609d
Fix staking
dvdplm Aug 3, 2018
0fb6dc1
Fix session
dvdplm Aug 3, 2018
6ebfc7f
Some polkadot fixes and lockfile
dvdplm Aug 3, 2018
056bffd
Fix executive
dvdplm Aug 3, 2018
ccb61a9
Merge branch 'master' into refactor/substrate-state-machine-generic
dvdplm Aug 3, 2018
f565cf9
fixup lockfile
dvdplm Aug 3, 2018
d11d578
Fix polkadot/api
dvdplm Aug 4, 2018
c7334b2
Fix polkadot/service
dvdplm Aug 4, 2018
b6bde9a
Fix polkadot/runtime tests
dvdplm Aug 4, 2018
08f25d3
Merge branch 'master' into refactor/substrate-state-machine-generic
dvdplm Aug 5, 2018
9b139b2
Fix tests in test-runtime
dvdplm Aug 6, 2018
0c82f95
Test fixes
dvdplm Aug 6, 2018
50b4b12
Fix missing component in the `std` feature
dvdplm Aug 6, 2018
111f9fd
Use PhantomData and Result from core
dvdplm Aug 6, 2018
1276733
Fix paths
dvdplm Aug 6, 2018
334e008
load heapsize on wasm
dvdplm Aug 6, 2018
2faff87
implement `HeapSizeOf` for wasm
dvdplm Aug 6, 2018
751fe9e
Add toy impl of `blake2_256` for no_std
dvdplm Aug 6, 2018
81d7278
lockfile
dvdplm Aug 6, 2018
dd551a6
Merge branch 'master' into refactor/substrate-state-machine-generic
dvdplm Aug 7, 2018
dcd9541
Use kvdb* from parity-common and fix errors
dvdplm Aug 7, 2018
2370a16
rebuilt lockfile
dvdplm Aug 7, 2018
0d4a4fe
Add dummy impl of `on_advance_round` for rhododendron::Context
dvdplm Aug 7, 2018
6367815
Fix build after merge
dvdplm Aug 7, 2018
cf7e338
Add HeapSizeOf bound where needed
dvdplm Aug 8, 2018
af1b17e
Sort out dependencies for no_std
dvdplm Aug 8, 2018
ca89697
Add HeapSizeOf bound where needed
dvdplm Aug 8, 2018
da711ef
use temp branch pending PR merges
dvdplm Aug 8, 2018
3b206c2
Remove unneeded tests
dvdplm Aug 8, 2018
8064c6d
Lock file and wasm artifacts
dvdplm Aug 8, 2018
0066026
lockfile
dvdplm Aug 8, 2018
bfcf5df
Use magic commit for libp2p
dvdplm Aug 8, 2018
35b29ba
Cleanup
dvdplm Aug 9, 2018
04b7065
Implement blake2_256 for no_std
dvdplm Aug 9, 2018
8152a78
Back on parity-common master
dvdplm Aug 9, 2018
cafe669
Merge branch 'master' into refactor/substrate-state-machine-generic
dvdplm Aug 9, 2018
11ea517
missing type params
dvdplm Aug 9, 2018
4d14020
Merge branch 'master' into refactor/substrate-state-machine-generic
gavofyork Aug 9, 2018
19d07db
Update Cargo.lock
gavofyork Aug 9, 2018
60df8c1
whitespace
dvdplm Aug 9, 2018
6833f7b
Merge branch 'refactor/substrate-state-machine-generic' of github.com…
dvdplm Aug 9, 2018
c30dff0
Rename concrete Rlp node codec "RlpCodec" and use everywhere
dvdplm Aug 14, 2018
0c66dec
Switch to use KeccakHasher
dvdplm Aug 14, 2018
af96467
Lock file and runtimes
dvdplm Aug 14, 2018
377de91
Merge branch 'master' into refactor/substrate-state-machine-generic
dvdplm Aug 14, 2018
eaea29c
Merge branch 'master' into refactor/substrate-state-machine-generic
dvdplm Aug 14, 2018
a98dd38
fixup lockfile
dvdplm Aug 14, 2018
2325dc8
Fix outstanding issue using concrete types (thanks @gnunicorn)
dvdplm Aug 14, 2018
68665b3
Cleanup
dvdplm Aug 14, 2018
41072eb
More cleanup
dvdplm Aug 14, 2018
58d919d
Comment out Blake2 Hasher
dvdplm Aug 14, 2018
38f4895
implement ext_keccak256
dvdplm Aug 14, 2018
0c19e18
Address todo: FetchChecker is generic
dvdplm Aug 14, 2018
8ef48c1
Merge branch 'master' into refactor/substrate-state-machine-generic
rphmeier Aug 15, 2018
a1a5bc1
all tests passing
rphmeier Aug 15, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
WIP make client generic
  • Loading branch information
dvdplm committed Aug 3, 2018
commit aa40b7832ecbd9b241c0243d578bae9e90e1d7cb
4 changes: 3 additions & 1 deletion Cargo.lock

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

3 changes: 3 additions & 0 deletions substrate/client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ substrate-runtime-primitives = { path = "../runtime/primitives" }
substrate-state-machine = { path = "../state-machine" }
substrate-keyring = { path = "../../substrate/keyring" }
substrate-telemetry = { path = "../telemetry" }
hashdb = { git = "https://github.com/paritytech/parity-common" }
patricia-trie = { git = "https://github.com/paritytech/parity-common" }
rlp = { git = "https://github.com/paritytech/parity-common" }

[dev-dependencies]
substrate-test-client = { path = "../test-client" }
2 changes: 1 addition & 1 deletion substrate/client/db/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ parking_lot = "0.4"
log = "0.3"
kvdb = { git = "https://github.com/paritytech/parity-common" }
kvdb-rocksdb = { git = "https://github.com/paritytech/parity-common" }
ethereum-types = "0.3"
# ethereum-types = "0.3"
hashdb = { git = "https://github.com/paritytech/parity-common" }
patricia-trie = { git = "https://github.com/paritytech/parity-common" }
memorydb = { git = "https://github.com/paritytech/parity-common" }
Expand Down
38 changes: 30 additions & 8 deletions substrate/client/src/backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,18 @@ use runtime_primitives::bft::Justification;
use runtime_primitives::generic::BlockId;
use runtime_primitives::traits::{Block as BlockT, NumberFor};
use state_machine::backend::Backend as StateBackend;
use patricia_trie::NodeCodec;
use hashdb::Hasher;

/// Block insertion operation. Keeps hold if the inserted block state and data.
pub trait BlockImportOperation<Block: BlockT> {
pub trait BlockImportOperation<Block, H, C>
where
Block: BlockT,
H: Hasher,
C: NodeCodec<H>,
{
/// Associated state backend type.
type State: StateBackend;
type State: StateBackend<H, C>;

/// Returns pending state. Returns None for backends with locally-unavailable state data.
fn state(&self) -> error::Result<Option<&Self::State>>;
Expand All @@ -43,7 +50,7 @@ pub trait BlockImportOperation<Block: BlockT> {
/// has been used to check justification of this block).
fn update_authorities(&mut self, authorities: Vec<AuthorityId>);
/// Inject storage data into the database.
fn update_storage(&mut self, update: <Self::State as StateBackend>::Transaction) -> error::Result<()>;
fn update_storage(&mut self, update: <Self::State as StateBackend<H, C>>::Transaction) -> error::Result<()>;
/// Inject storage data into the database replacing any existing data.
fn reset_storage<I: Iterator<Item=(Vec<u8>, Vec<u8>)>>(&mut self, iter: I) -> error::Result<()>;
}
Expand All @@ -56,13 +63,18 @@ pub trait BlockImportOperation<Block: BlockT> {
///
/// The same applies for live `BlockImportOperation`s: while an import operation building on a parent `P`
/// is alive, the state for `P` should not be pruned.
pub trait Backend<Block: BlockT>: Send + Sync {
pub trait Backend<Block, H, C>: Send + Sync
where
Block: BlockT,
H: Hasher,
C: NodeCodec<H>,
{
/// Associated block insertion operation type.
type BlockImportOperation: BlockImportOperation<Block>;
type BlockImportOperation: BlockImportOperation<Block, H, C>;
/// Associated blockchain backend type.
type Blockchain: ::blockchain::Backend<Block>;
/// Associated state backend type.
type State: StateBackend;
type State: StateBackend<H, C>;

/// Begin a new block insertion transaction with given parent block id.
/// When constructing the genesis, this is called with all-zero hash.
Expand All @@ -79,7 +91,17 @@ pub trait Backend<Block: BlockT>: Send + Sync {
}

/// Mark for all Backend implementations, that are making use of state data, stored locally.
pub trait LocalBackend<Block: BlockT>: Backend<Block> {}
pub trait LocalBackend<Block, H, C>: Backend<Block, H, C>
where
Block: BlockT,
H: Hasher,
C: NodeCodec<H>,
{}

/// Mark for all Backend implementations, that are fetching required state data from remote nodes.
pub trait RemoteBackend<Block: BlockT>: Backend<Block> {}
pub trait RemoteBackend<Block, H, C>: Backend<Block, H, C>
where
Block: BlockT,
H: Hasher,
C: NodeCodec<H>,
{}
22 changes: 16 additions & 6 deletions substrate/client/src/block_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,18 @@ use runtime_primitives::traits::{Header as HeaderT, Hash, Block as BlockT, One,
use runtime_primitives::generic::BlockId;
use {backend, error, Client, CallExecutor};
use runtime_primitives::{ApplyResult, ApplyOutcome};
use patricia_trie::NodeCodec;
use hashdb::Hasher;
use rlp::Encodable;

/// Utility for building new (valid) blocks from a stream of extrinsics.
pub struct BlockBuilder<B, E, Block> where
B: backend::Backend<Block>,
E: CallExecutor<Block> + Clone,
pub struct BlockBuilder<B, E, Block, H, C>
where
B: backend::Backend<Block, H, C>,
E: CallExecutor<Block, H, C> + Clone,
Block: BlockT,
H: Hasher,
C: NodeCodec<H>,
{
header: <Block as BlockT>::Header,
extrinsics: Vec<<Block as BlockT>::Extrinsic>,
Expand All @@ -37,10 +43,14 @@ pub struct BlockBuilder<B, E, Block> where
changes: state_machine::OverlayedChanges,
}

impl<B, E, Block> BlockBuilder<B, E, Block> where
B: backend::Backend<Block>,
E: CallExecutor<Block> + Clone,
impl<B, E, Block, H, C> BlockBuilder<B, E, Block, H, C>
where
B: backend::Backend<Block, H, C>,
E: CallExecutor<Block, H, C> + Clone,
Block: BlockT,
H: Hasher,
H::Out: Encodable + Ord,
C: NodeCodec<H>,
{
/// Create a new instance of builder from the given client, building on the latest block.
pub fn new(client: &Client<B, E, Block>) -> error::Result<Self> {
Expand Down
35 changes: 24 additions & 11 deletions substrate/client/src/call_executor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,16 @@
// along with Polkadot. If not, see <http://www.gnu.org/licenses/>.

use std::sync::Arc;
use std::cmp::Ord;
use runtime_primitives::generic::BlockId;
use runtime_primitives::traits::Block as BlockT;
use state_machine::{self, OverlayedChanges, Ext,
use state_machine::{self, OverlayedChanges, Ext,
CodeExecutor, ExecutionManager, native_when_possible};
use runtime_io::Externalities;
use executor::{RuntimeVersion, RuntimeInfo};
use patricia_trie::NodeCodec;
use hashdb::Hasher;
use rlp::Encodable;

use backend;
use error;
Expand All @@ -35,7 +39,13 @@ pub struct CallResult {
}

/// Method call executor.
pub trait CallExecutor<B: BlockT> {
pub trait CallExecutor<B, H, C>
where
B: BlockT,
H: Hasher,
H::Out: Ord + Encodable,
C: NodeCodec<H>,
{
/// Externalities error type.
type Error: state_machine::Error;

Expand All @@ -57,7 +67,7 @@ pub trait CallExecutor<B: BlockT> {
///
/// No changes are made.
fn call_at_state<
S: state_machine::Backend,
S: state_machine::Backend<H, C>,
F: FnOnce(Result<Vec<u8>, Self::Error>, Result<Vec<u8>, Self::Error>) -> Result<Vec<u8>, Self::Error>,
>(&self,
state: &S,
Expand All @@ -70,7 +80,7 @@ pub trait CallExecutor<B: BlockT> {
/// Execute a call to a contract on top of given state, gathering execution proof.
///
/// No changes are made.
fn prove_at_state<S: state_machine::Backend>(&self,
fn prove_at_state<S: state_machine::Backend<H, C>>(&self,
state: S,
overlay: &mut OverlayedChanges,
method: &str,
Expand Down Expand Up @@ -104,11 +114,14 @@ impl<B, E> Clone for LocalCallExecutor<B, E> where E: Clone {
}
}

impl<B, E, Block> CallExecutor<Block> for LocalCallExecutor<B, E>
where
B: backend::LocalBackend<Block>,
E: CodeExecutor + RuntimeInfo,
Block: BlockT,
impl<B, E, Block, H, C> CallExecutor<Block, H, C> for LocalCallExecutor<B, E>
where
B: backend::LocalBackend<Block, H, C>,
E: CodeExecutor<H> + RuntimeInfo,
Block: BlockT,
H: Hasher,
H::Out: Encodable + Ord,
C: NodeCodec<H>,
{
type Error = E::Error;

Expand Down Expand Up @@ -140,7 +153,7 @@ impl<B, E, Block> CallExecutor<Block> for LocalCallExecutor<B, E>
}

fn call_at_state<
S: state_machine::Backend,
S: state_machine::Backend<H, C>,
F: FnOnce(Result<Vec<u8>, Self::Error>, Result<Vec<u8>, Self::Error>) -> Result<Vec<u8>, Self::Error>,
>(&self,
state: &S,
Expand All @@ -159,7 +172,7 @@ impl<B, E, Block> CallExecutor<Block> for LocalCallExecutor<B, E>
).map_err(Into::into)
}

fn prove_at_state<S: state_machine::Backend>(&self,
fn prove_at_state<S: state_machine::Backend<H, C>>(&self,
state: S,
changes: &mut OverlayedChanges,
method: &str,
Expand Down
59 changes: 40 additions & 19 deletions substrate/client/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
//! Substrate Client

use std::sync::Arc;
use std::cmp::Ord;
use futures::sync::mpsc;
use parking_lot::{Mutex, RwLock};
use primitives::AuthorityId;
Expand All @@ -33,6 +34,9 @@ use call_executor::{CallExecutor, LocalCallExecutor};
use executor::{RuntimeVersion, RuntimeInfo};
use notifications::{StorageNotifications, StorageEventStream};
use {error, in_mem, block_builder, runtime_io, bft, genesis};
use patricia_trie::NodeCodec;
use hashdb::Hasher;
use rlp::Encodable;

/// Type that implements `futures::Stream` of block import events.
pub type BlockchainEventStream<Block> = mpsc::UnboundedReceiver<BlockImportNotification<Block>>;
Expand Down Expand Up @@ -151,24 +155,30 @@ impl<Block: BlockT> JustifiedHeader<Block> {
}

/// Create an instance of in-memory client.
pub fn new_in_mem<E, Block, S>(
pub fn new_in_mem<E, Block, S, H, C>(
executor: E,
genesis_storage: S,
) -> error::Result<Client<in_mem::Backend<Block>, LocalCallExecutor<in_mem::Backend<Block>, E>, Block>>
) -> error::Result<Client<in_mem::Backend<Block, H, C>, LocalCallExecutor<in_mem::Backend<Block, H, C>, E>, Block>>
where
E: CodeExecutor + RuntimeInfo,
E: CodeExecutor<H> + RuntimeInfo,
S: BuildStorage,
Block: BlockT,
H: Hasher,
H::Out: Encodable + Ord,
C: NodeCodec<H> + Send + Sync,
{
let backend = Arc::new(in_mem::Backend::new());
let executor = LocalCallExecutor::new(backend.clone(), executor);
Client::new(backend, executor, genesis_storage, ExecutionStrategy::NativeWhenPossible)
}

impl<B, E, Block> Client<B, E, Block> where
B: backend::Backend<Block>,
E: CallExecutor<Block>,
impl<B, E, Block, H, C> Client<B, E, Block> where
B: backend::Backend<Block, H, C>,
E: CallExecutor<Block, H, C>,
Block: BlockT,
H: Hasher,
H::Out: Encodable + Ord,
C: NodeCodec<H>,
{
/// Creates new Substrate Client with given blockchain and code executor.
pub fn new<S: BuildStorage>(
Expand Down Expand Up @@ -267,12 +277,12 @@ impl<B, E, Block> Client<B, E, Block> where
}

/// Create a new block, built on the head of the chain.
pub fn new_block(&self) -> error::Result<block_builder::BlockBuilder<B, E, Block>> where E: Clone {
pub fn new_block(&self) -> error::Result<block_builder::BlockBuilder<B, E, Block, H, C>> where E: Clone {
block_builder::BlockBuilder::new(self)
}

/// Create a new block, built on top of `parent`.
pub fn new_block_at(&self, parent: &BlockId<Block>) -> error::Result<block_builder::BlockBuilder<B, E, Block>> where E: Clone {
pub fn new_block_at(&self, parent: &BlockId<Block>) -> error::Result<block_builder::BlockBuilder<B, E, Block, H, C>> where E: Clone {
block_builder::BlockBuilder::at_block(parent, &self)
}

Expand Down Expand Up @@ -485,11 +495,14 @@ impl<B, E, Block> Client<B, E, Block> where
}
}

impl<B, E, Block> bft::BlockImport<Block> for Client<B, E, Block>
impl<B, E, Block, H, C> bft::BlockImport<Block> for Client<B, E, Block>
where
B: backend::Backend<Block>,
E: CallExecutor<Block>,
B: backend::Backend<Block, H, C>,
E: CallExecutor<Block, H, C>,
Block: BlockT,
H: Hasher,
H::Out: Encodable + Ord,
C: NodeCodec<H>,
{
fn import_block(
&self,
Expand All @@ -508,11 +521,14 @@ impl<B, E, Block> bft::BlockImport<Block> for Client<B, E, Block>
}
}

impl<B, E, Block> bft::Authorities<Block> for Client<B, E, Block>
impl<B, E, Block, H, C> bft::Authorities<Block> for Client<B, E, Block>
where
B: backend::Backend<Block>,
E: CallExecutor<Block>,
B: backend::Backend<Block, H, C>,
E: CallExecutor<Block, H, C>,
Block: BlockT,
H: Hasher,
H::Out: Encodable + Ord,
C: NodeCodec<H>,
{
fn authorities(&self, at: &BlockId<Block>) -> Result<Vec<AuthorityId>, bft::Error> {
let on_chain_version: Result<_, bft::Error> = self.runtime_version_at(at)
Expand All @@ -531,10 +547,12 @@ impl<B, E, Block> bft::Authorities<Block> for Client<B, E, Block>
}
}

impl<B, E, Block> BlockchainEvents<Block> for Client<B, E, Block>
impl<B, E, Block, H, C> BlockchainEvents<Block> for Client<B, E, Block>
where
E: CallExecutor<Block>,
E: CallExecutor<Block, H, C>,
Block: BlockT,
H: Hasher,
C: NodeCodec<H>,
{
/// Get block import event stream.
fn import_notification_stream(&self) -> BlockchainEventStream<Block> {
Expand All @@ -549,11 +567,14 @@ impl<B, E, Block> BlockchainEvents<Block> for Client<B, E, Block>
}
}

impl<B, E, Block> ChainHead<Block> for Client<B, E, Block>
impl<B, E, Block, H, C> ChainHead<Block> for Client<B, E, Block>
where
B: backend::Backend<Block>,
E: CallExecutor<Block>,
B: backend::Backend<Block, H, C>,
E: CallExecutor<Block, H, C>,
Block: BlockT,
H: Hasher,
H::Out: Encodable + Ord,
C: NodeCodec<H>,
{
fn best_block_header(&self) -> error::Result<<Block as BlockT>::Header> {
Client::best_block_header(self)
Expand Down
Loading