Type Alias frontier_template_node::service::FullSelectChain
source · type FullSelectChain = LongestChain<TFullBackend<Block>, Block>;
Aliased Type§
struct FullSelectChain {
backend: Arc<Backend<Block<Header<u32, BlakeTwo256>, OpaqueExtrinsic>>>,
_phantom: PhantomData<Block<Header<u32, BlakeTwo256>, OpaqueExtrinsic>>,
}
Fields§
§backend: Arc<Backend<Block<Header<u32, BlakeTwo256>, OpaqueExtrinsic>>>
§_phantom: PhantomData<Block<Header<u32, BlakeTwo256>, OpaqueExtrinsic>>
Implementations
Trait Implementations
§impl<B, Block> SelectChain<Block> for LongestChain<B, Block>where
B: Backend<Block>,
Block: Block,
impl<B, Block> SelectChain<Block> for LongestChain<B, Block>where
B: Backend<Block>,
Block: Block,
§fn leaves<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Vec<<Block as Block>::Hash>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
LongestChain<B, Block>: 'async_trait,
fn leaves<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Vec<<Block as Block>::Hash>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
LongestChain<B, Block>: 'async_trait,
Get all leaves of the chain, i.e. block hashes that have no children currently.
Leaves that can never be finalized will not be returned.
§fn best_chain<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<<Block as Block>::Header, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
LongestChain<B, Block>: 'async_trait,
fn best_chain<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<<Block as Block>::Header, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
LongestChain<B, Block>: 'async_trait,
Among those
leaves
deterministically pick one chain as the generally
best chain to author new blocks upon and probably (but not necessarily)
finalize.§fn finality_target<'life0, 'async_trait>(
&'life0 self,
base_hash: <Block as Block>::Hash,
maybe_max_number: Option<<<Block as Block>::Header as Header>::Number>
) -> Pin<Box<dyn Future<Output = Result<<Block as Block>::Hash, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
LongestChain<B, Block>: 'async_trait,
fn finality_target<'life0, 'async_trait>(
&'life0 self,
base_hash: <Block as Block>::Hash,
maybe_max_number: Option<<<Block as Block>::Header as Header>::Number>
) -> Pin<Box<dyn Future<Output = Result<<Block as Block>::Hash, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
LongestChain<B, Block>: 'async_trait,
Get the best descendent of
base_hash
that we should attempt to
finalize next, if any. It is valid to return the given base_hash
itself if no better descendent exists.