pub struct Confirmer { /* private fields */ }Implementations§
Source§impl Confirmer
impl Confirmer
pub fn new(publishers: Vec<Key>, unl_dir: PathBuf) -> Confirmer
Sourcepub fn latest_lists(&self) -> Vec<(Key, u64, usize, Option<u32>)>
pub fn latest_lists(&self) -> Vec<(Key, u64, usize, Option<u32>)>
Each configured publisher’s latest list: publisher, sequence, number of validators, expiration (seconds since the XRPL epoch).
pub fn stats(&self) -> (bool, u64, u64, u64)
Sourcepub fn add_validation(&self, raw: &[u8]) -> Result<Key, String>
pub fn add_validation(&self, raw: &[u8]) -> Result<Key, String>
Accepts a raw validation: the signature must check out.
Only validations from known validators move the retention window;
otherwise a stranger’s valid signature with a distant sequence could
wipe the buffers and the quorum of the current ledger. Sequences beyond the window, ahead or behind, are not
stored, and a ledger gets at most PER_LEDGER entries. A full
validation replaces a partial one from the same key for the same hash.
Sourcepub fn add_manifest(&self, raw: &[u8])
pub fn add_manifest(&self, raw: &[u8])
Manifest from the node: it enters the mapping only if the signatures check out.
Sourcepub fn validations_for(
&self,
sequence: u32,
hash: &[u8; 32],
) -> Vec<(Vec<u8>, u64)>
pub fn validations_for( &self, sequence: u32, hash: &[u8; 32], ) -> Vec<(Vec<u8>, u64)>
Raw validations of the ledger for this hash: (bytes, when received).
Sourcepub fn publisher_responses(
&self,
from: u32,
to: u32,
) -> Vec<(String, Vec<u8>, u64)>
pub fn publisher_responses( &self, from: u32, to: u32, ) -> Vec<(String, Vec<u8>, u64)>
Publisher responses whose lists were in effect at any moment of the window
[from, to] (seconds since the XRPL epoch): (site, body, when first
seen).
Sourcepub fn node_manifests(&self) -> Vec<Vec<u8>>
pub fn node_manifests(&self) -> Vec<Vec<u8>>
Manifests from the node as bytes, for validators that rotated keys after the list was published.
pub fn publishers(&self) -> Vec<Key> ⓘ
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Confirmer
impl RefUnwindSafe for Confirmer
impl Send for Confirmer
impl Sync for Confirmer
impl Unpin for Confirmer
impl UnsafeUnpin for Confirmer
impl UnwindSafe for Confirmer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].