Struct exonum_btc_anchoring::AnchoringService
[−]
[src]
pub struct AnchoringService { /* fields omitted */ }
Anchoring service implementation for the Exonum blockchain.
Methods
impl AnchoringService
[src]
pub fn new(
consensus: AnchoringConfig,
local: AnchoringNodeConfig
) -> AnchoringService
[src]
consensus: AnchoringConfig,
local: AnchoringNodeConfig
) -> AnchoringService
Creates a new service instance with the given consensus
and local
configurations.
pub fn handler(&self) -> Arc<Mutex<AnchoringHandler>>
[src]
Returns an internal handler
Trait Implementations
impl Debug for AnchoringService
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Service for AnchoringService
[src]
fn service_id(&self) -> u16
[src]
Service identifier for database schema and service messages. Must be unique within the blockchain. Read more
fn service_name(&self) -> &'static str
[src]
A comprehensive string service name. Must be unique within the blockchain. Read more
fn state_hash(&self, snapshot: &Snapshot) -> Vec<Hash>
[src]
Returns a list of root hashes of tables that determine the current state of the service database. These hashes are collected from all the services in a common ProofMapIndex
accessible in the core schema as [state_hash_aggregator
][1]. Read more
fn tx_from_raw(
&self,
raw: RawTransaction
) -> Result<Box<Transaction>, StreamStructError>
[src]
&self,
raw: RawTransaction
) -> Result<Box<Transaction>, StreamStructError>
Tries to create a Transaction
from the given raw message. Read more
fn initialize(&self, fork: &mut Fork) -> Value
[src]
Initializes the information schema of the service and generates an initial service configuration. Called on genesis block creation. Read more
fn handle_commit(&self, state: &ServiceContext)
[src]
Handles block commit. This handler is invoked for each service after commit of the block. For example, a service can create one or more transactions if a specific condition has occurred. Read more
fn public_api_handler(&self, context: &ApiContext) -> Option<Box<Handler>>
[src]
Public api implementation.
See PublicApi
for details.
fn private_api_handler(
&self,
context: &ApiContext
) -> Option<Box<Handler + 'static>>
[src]
&self,
context: &ApiContext
) -> Option<Box<Handler + 'static>>
Returns an API handler for private requests. The handler is mounted on the /api/services/{service_name}
path at [the private listen address][private-addr] of all full nodes in the blockchain network. Read more