Struct exonum_configuration::ConfigurationService
[−]
[src]
pub struct ConfigurationService {}
Struct, implementing Service trait template.
Most of the actual business logic of modifying Exonum
blockchain configuration is inside of
TxConfigPropose
and
TxConfigVote
.
Methods
impl ConfigurationService
[src]
fn new() -> ConfigurationService
Trait Implementations
impl Default for ConfigurationService
[src]
fn default() -> ConfigurationService
Returns the "default value" for a type. Read more
impl Service for ConfigurationService
[src]
fn service_name(&self) -> &'static str
Unique human readable service name.
fn service_id(&self) -> u16
Unique service identification for database schema and service messages.
fn state_hash(&self, snapshot: &Snapshot) -> Vec<Hash>
ConfigurationService
returns a vector, containing the single root_hash
of all config proposes table.
Thus, state_hash
is affected by any new valid propose and indirectly by
any new vote for a propose.
When a new vote for a config propose is added the root_hash of corresponding
votes for a propose table
is modified. Such hash is stored in each entry of all config proposes table
- StorageValueConfigProposeData
.
fn tx_from_raw(
&self,
raw: RawTransaction
) -> Result<Box<Transaction>, StreamStructError>
&self,
raw: RawTransaction
) -> Result<Box<Transaction>, StreamStructError>
Returns box (ConfigTx)
fn public_api_handler(&self, ctx: &ApiContext) -> Option<Box<Handler>>
Returns api handler for public users.
fn private_api_handler(&self, ctx: &ApiContext) -> Option<Box<Handler>>
Returns api handler for maintainers.
fn initialize(&self, fork: &mut Fork) -> Value
By this method you can initialize information schema of service and generates initial service configuration. This method is called on genesis block creation event. Read more
fn handle_commit(&self, context: &mut ServiceContext)
Handles commit event. This handler is invoked for each service after commit of the block. For example service can create some transaction if the specific condition occurred. Read more
impl ServiceFactory for ConfigurationService
[src]
fn make_service(_: &Context) -> Box<Service>
Create a new service instance from the context returned by the Run
command.
fn command(command: &'static str) -> Option<Box<CommandExtension + 'static>>
Returns CommandExtension
for the specific CommandName
.