OpenCBDC Transaction Processor
|
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 & |
Represents the internal state of an ongoing status update request.
Returned in pertinent success responses.
Definition at line 84 of file status_update.hpp.
cbdc::watchtower::status_update_state::status_update_state | ( | search_status | status, |
uint64_t | block_height, | ||
hash_t | uhs_id ) |
Constructor.
status | current status of a running search. |
uhs_id | the UHS ID for which this status is valid. |
block_height | the 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().
|
explicit |
Construct from a packet.
pkt | packet containing a serialized StatusUpdateState. |
Definition at line 27 of file status_update.cpp.
References status_update_state().
|
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.
Definition at line 36 of file status_update.cpp.
auto cbdc::watchtower::status_update_state::operator== | ( | const status_update_state & | rhs | ) | const -> bool |
Definition at line 44 of file status_update.cpp.
|
nodiscard |
Returns the current SearchStatus of the StatusUpdate.
Definition at line 32 of file status_update.cpp.
|
nodiscard |
Returns the UHS ID for which the status is valid.
Definition at line 40 of file status_update.cpp.
|
friend |
|
friend |
|
friend |
Definition at line 94 of file status_update.hpp.