mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 21:01:02 +00:00
FinalityEngine in substrate relay (#1374)
* introduce FinalityEngine in relay code * add FinalityEngine to relay * spelling * fix test compilation * Update relays/lib-substrate-relay/src/finality/source.rs Co-authored-by: Adrian Catangiu <adrian@parity.io> Co-authored-by: Adrian Catangiu <adrian@parity.io>
This commit is contained in:
committed by
Bastian Köcher
parent
6a4144e8f2
commit
b3c8852bcf
@@ -704,8 +704,8 @@ impl<C: Chain> Client<C> {
|
||||
.await
|
||||
}
|
||||
|
||||
/// Return new justifications stream.
|
||||
pub async fn subscribe_justifications(&self) -> Result<Subscription<Bytes>> {
|
||||
/// Return new GRANDPA justifications stream.
|
||||
pub async fn subscribe_grandpa_justifications(&self) -> Result<Subscription<Bytes>> {
|
||||
let subscription = self
|
||||
.jsonrpsee_execute(move |client| async move {
|
||||
Ok(client
|
||||
|
||||
@@ -45,9 +45,9 @@ pub enum Error {
|
||||
/// Account does not exist on the chain.
|
||||
#[error("Account does not exist on the chain.")]
|
||||
AccountDoesNotExist,
|
||||
/// Runtime storage is missing mandatory ":code:" entry.
|
||||
#[error("Mandatory :code: entry is missing from runtime storage.")]
|
||||
MissingMandatoryCodeEntry,
|
||||
/// Runtime storage is missing some mandatory value.
|
||||
#[error("Mandatory storage value is missing from the runtime storage.")]
|
||||
MissingMandatoryStorageValue,
|
||||
/// The client we're connected to is not synced, so we can't rely on its state.
|
||||
#[error("Substrate client is not synced {0}.")]
|
||||
ClientNotSynced(Health),
|
||||
|
||||
@@ -72,7 +72,7 @@ impl<C: Chain> StorageProofOverheadMetric<C> {
|
||||
let maybe_encoded_storage_value =
|
||||
storage_value_reader.read_value(CODE).map_err(Error::StorageProofError)?;
|
||||
let encoded_storage_value_size =
|
||||
maybe_encoded_storage_value.ok_or(Error::MissingMandatoryCodeEntry)?.len();
|
||||
maybe_encoded_storage_value.ok_or(Error::MissingMandatoryStorageValue)?.len();
|
||||
|
||||
Ok(storage_proof_size - encoded_storage_value_size)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user