OpenCBDC Transaction Processor
|
Sentinel implementation. More...
#include <controller.hpp>
Public Member Functions | |
controller ()=delete | |
controller (const controller &)=delete | |
auto | operator= (const controller &) -> controller &=delete |
controller (controller &&)=delete | |
auto | operator= (controller &&) -> controller &=delete |
controller (uint32_t sentinel_id, config::options opts, std::shared_ptr< logging::log > logger) | |
Constructor. | |
~controller () override=default | |
auto | init () -> bool |
Initializes the controller. | |
auto | execute_transaction (transaction::full_tx tx) -> std::optional< cbdc::sentinel::execute_response > override |
Validate transaction, forward it to shards for processing, and return the validation result to send back to the originating client. | |
auto | validate_transaction (transaction::full_tx tx) -> std::optional< validate_response > override |
Validate transaction and generate a sentinel attestation if the transaction is valid. | |
![]() | |
virtual | ~interface ()=default |
interface ()=default | |
interface (const interface &)=delete | |
auto | operator= (const interface &) -> interface &=delete |
interface (interface &&)=delete | |
auto | operator= (interface &&) -> interface &=delete |
Sentinel implementation.
Definition at line 21 of file uhs/atomizer/sentinel/controller.hpp.
|
delete |
|
delete |
|
delete |
cbdc::sentinel::controller::controller | ( | uint32_t | sentinel_id, |
config::options | opts, | ||
std::shared_ptr< logging::log > | logger ) |
Constructor.
sentinel_id | the running ID of this shard. |
opts | pointer to configuration options. |
logger | pointer shared logger. |
Definition at line 15 of file uhs/atomizer/sentinel/controller.cpp.
|
overridedefault |
|
overridevirtual |
Validate transaction, forward it to shards for processing, and return the validation result to send back to the originating client.
tx | transaction to execute. |
Implements cbdc::sentinel::interface.
Definition at line 86 of file uhs/atomizer/sentinel/controller.cpp.
References cbdc::transaction::validation::check_tx(), cbdc::sentinel::pending, cbdc::sentinel::static_invalid, cbdc::to_string(), and cbdc::transaction::tx_id().
auto cbdc::sentinel::controller::init | ( | ) | -> bool |
Initializes the controller.
Establishes connections to the shards
Definition at line 22 of file uhs/atomizer/sentinel/controller.cpp.
References cbdc::client::init(), cbdc::pubkey_from_privkey(), and cbdc::to_string().
|
delete |
|
delete |
|
overridevirtual |
Validate transaction and generate a sentinel attestation if the transaction is valid.
tx | transaction to validate and attest to. |
Implements cbdc::sentinel::interface.
Definition at line 118 of file uhs/atomizer/sentinel/controller.cpp.
References cbdc::transaction::validation::check_tx().