Struct tc_finality_grandpa::FinalityProofProvider[][src]

pub struct FinalityProofProvider<BE, Block: BlockT> { /* fields omitted */ }

Finality proof provider for serving network requests.

Implementations

impl<B, Block: BlockT> FinalityProofProvider<B, Block> where
    B: Backend<Block> + Send + Sync + 'static, 
[src]

pub fn new(
    backend: Arc<B>,
    shared_authority_set: Option<SharedAuthoritySet<Block::Hash, NumberFor<Block>>>
) -> Self
[src]

Create new finality proof provider using:

  • backend for accessing blockchain data;
  • authority_provider for calling and proving runtime methods.
  • shared_authority_set for accessing authority set data

pub fn new_for_service(
    backend: Arc<B>,
    shared_authority_set: Option<SharedAuthoritySet<Block::Hash, NumberFor<Block>>>
) -> Arc<Self>
[src]

Create new finality proof provider for the service using:

  • backend for accessing blockchain data;
  • storage_provider, which is generally a client.
  • shared_authority_set for accessing authority set data

impl<B, Block> FinalityProofProvider<B, Block> where
    Block: BlockT,
    NumberFor<Block>: BlockNumberOps,
    B: Backend<Block> + Send + Sync + 'static, 
[src]

pub fn prove_finality(
    &self,
    block: NumberFor<Block>
) -> Result<Option<Vec<u8>>, FinalityProofError>
[src]

Prove finality for the given block number by returning a Justification for the last block of the authority set.

Auto Trait Implementations

impl<BE, Block> !RefUnwindSafe for FinalityProofProvider<BE, Block>

impl<BE, Block> Send for FinalityProofProvider<BE, Block> where
    BE: Send + Sync

impl<BE, Block> Sync for FinalityProofProvider<BE, Block> where
    BE: Send + Sync

impl<BE, Block> Unpin for FinalityProofProvider<BE, Block>

impl<BE, Block> !UnwindSafe for FinalityProofProvider<BE, Block>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> CheckedConversion for T[src]

impl<T> Downcast for T where
    T: Any

impl<T> DowncastSync for T where
    T: Any + Send + Sync

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, Outer> IsWrappedBy<Outer> for T where
    T: From<Outer>,
    Outer: AsRef<T> + AsMut<T> + From<T>, 
[src]

pub fn from_ref(outer: &Outer) -> &T[src]

Get a reference to the inner from the outer.

pub fn from_mut(outer: &mut Outer) -> &mut T[src]

Get a mutable reference to the inner from the outer.

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> SaturatedConversion for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<S, T> UncheckedInto<T> for S where
    T: UncheckedFrom<S>, 
[src]

impl<T, S> UniqueSaturatedInto<T> for S where
    T: Bounded,
    S: TryInto<T>, 
[src]

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,