Struct exonum::blockchain::ServiceContext [] [src]

pub struct ServiceContext { /* fields omitted */ }

The current node state on which the blockchain is running, or in other words execution context.

Methods

impl ServiceContext
[src]

[src]

Creates the service context for the given node.

This method is necessary if you want to implement an alternative exonum node. For example, you can implement special node without consensus for regression testing of services business logic.

[src]

If the current node is validator returns its identifier. For other nodes return None.

[src]

Returns the current database snapshot.

[src]

Returns the current blockchain height. This height is "height of the last committed block".

[src]

Returns the current list of validators.

[src]

Returns current node's public key.

[src]

Returns current node's secret key.

[src]

Returns the actual consensus configuration.

[src]

Returns service specific global variables as json value.

[src]

Returns reference to the transaction sender.

[src]

Returns the actual blockchain global configuration.

Trait Implementations

impl Debug for ServiceContext
[src]

[src]

Formats the value using the given formatter.