OpenCBDC Transaction Processor
Loading...
Searching...
No Matches
cbdc::watchtower::status_update_state Class Reference

Represents the internal state of an ongoing status update request. More...

#include <status_update.hpp>

Public Member Functions

auto operator== (const status_update_state &rhs) const -> bool
 
 status_update_state (search_status status, uint64_t block_height, hash_t uhs_id)
 Constructor.
 
 status_update_state (cbdc::serializer &pkt)
 Construct from a packet.
 
auto status () const -> search_status
 Returns the current SearchStatus of the StatusUpdate.
 
auto block_height () const -> uint64_t
 Return the block height of the block containing the transaction in which the UHS ID was found.
 
auto uhs_id () const -> hash_t
 Returns the UHS ID for which the status is valid.
 

Friends

class status_request_check_success
 
auto cbdc::operator<< (cbdc::serializer &packet, const cbdc::watchtower::status_update_state &state) -> cbdc::serializer &
 
auto cbdc::operator>> (cbdc::serializer &packet, cbdc::watchtower::status_update_state &state) -> cbdc::serializer &
 

Detailed Description

Represents the internal state of an ongoing status update request.

Returned in pertinent success responses.

Definition at line 84 of file status_update.hpp.

Constructor & Destructor Documentation

◆ status_update_state() [1/2]

cbdc::watchtower::status_update_state::status_update_state ( search_status status,
uint64_t block_height,
hash_t uhs_id )

Constructor.

Parameters
statuscurrent status of a running search.
uhs_idthe UHS ID for which this status is valid.
block_heightthe index of the block in which the watchtower found the transaction. Not valid if uhs_id is empty.

Definition at line 51 of file status_update.cpp.

Referenced by status_update_state().

◆ status_update_state() [2/2]

cbdc::watchtower::status_update_state::status_update_state ( cbdc::serializer & pkt)
explicit

Construct from a packet.

Parameters
pktpacket containing a serialized StatusUpdateState.

Definition at line 27 of file status_update.cpp.

References status_update_state().

Here is the call graph for this function:

Member Function Documentation

◆ block_height()

auto cbdc::watchtower::status_update_state::block_height ( ) const -> uint64_t
nodiscard

Return the block height of the block containing the transaction in which the UHS ID was found.

This value should only be considered valid if status() is spent or unspent.

Returns
UHS ID block height.

Definition at line 36 of file status_update.cpp.

◆ operator==()

auto cbdc::watchtower::status_update_state::operator== ( const status_update_state & rhs) const -> bool

Definition at line 44 of file status_update.cpp.

◆ status()

auto cbdc::watchtower::status_update_state::status ( ) const -> search_status
nodiscard

Returns the current SearchStatus of the StatusUpdate.

Returns
the current SearchStatus.

Definition at line 32 of file status_update.cpp.

◆ uhs_id()

auto cbdc::watchtower::status_update_state::uhs_id ( ) const -> hash_t
nodiscard

Returns the UHS ID for which the status is valid.

Returns
UHS ID.

Definition at line 40 of file status_update.cpp.

Friends And Related Symbol Documentation

◆ cbdc::operator<<

auto cbdc::operator<< ( cbdc::serializer & packet,
const cbdc::watchtower::status_update_state & state ) -> cbdc::serializer &
friend

◆ cbdc::operator>>

auto cbdc::operator>> ( cbdc::serializer & packet,
cbdc::watchtower::status_update_state & state ) -> cbdc::serializer &
friend

◆ status_request_check_success

friend class status_request_check_success
friend

Definition at line 94 of file status_update.hpp.


The documentation for this class was generated from the following files: