[][src]Struct splinter::service::scabbard::Scabbard

pub struct Scabbard { /* fields omitted */ }

A service for running Sawtooth Sabre smart contracts with two-phase commit consensus.

Methods

impl Scabbard[src]

pub fn new(
    service_id: String,
    circuit_id: &str,
    peer_services: HashSet<String>,
    state_db_dir: &Path,
    state_db_size: usize,
    receipt_db_dir: &Path,
    receipt_db_size: usize,
    signature_verifier: Box<dyn SignatureVerifier>,
    admin_keys: Vec<String>,
    coordinator_timeout: Option<Duration>
) -> Result<Self, ScabbardError>
[src]

Generate a new Scabbard service.

pub fn get_state_at_address(
    &self,
    address: &str
) -> Result<Option<Vec<u8>>, ScabbardError>
[src]

pub fn get_state_with_prefix(
    &self,
    prefix: Option<&str>
) -> Result<Box<dyn Iterator<Item = Result<(String, Vec<u8>), ScabbardStateError>>>, ScabbardError>
[src]

pub fn add_batches(
    &self,
    batches: Vec<BatchPair>
) -> Result<Option<BatchListPath>, ScabbardError>
[src]

pub fn get_batch_info(
    &self,
    ids: HashSet<String>,
    wait: Option<Duration>
) -> Result<BatchInfoIter, ScabbardError>
[src]

Get the BatchInfo for each specified batch.

Arguments

  • ids: List of batch IDs to get info on
  • wait: If Some, wait up to the given time for all requested batches to complete (statuses will be either Committed or Invalid); if the timeout expires, an Err result will be given by the returned iterator. If None, return the BatchInfos to complete.

pub fn get_events_since(
    &self,
    event_id: Option<String>
) -> Result<Events, ScabbardError>
[src]

pub fn add_state_subscriber(
    &self,
    subscriber: Box<dyn StateSubscriber>
) -> Result<(), ScabbardError>
[src]

Trait Implementations

impl Clone for Scabbard[src]

impl Service for Scabbard[src]

Auto Trait Implementations

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<'a, T> DefaultFeatures<'a> for T where
    T: 'a + Clone + Send + Sync

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

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

impl<T> IntoSql for T

impl<'a, T> NonSyncFeatures<'a> for T where
    T: 'a + Clone

impl<T> SafeBorrow<T> for T where
    T: ?Sized

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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<V, T> VZip<V> for T where
    V: MultiLane<T>,