CatapultServer  v0.5.0.1 (Elephant)
catapult::state::TimestampedHash Struct Reference

Represents a hash with attached timestamp. More...

Collaboration diagram for catapult::state::TimestampedHash:

Public Types

using HashType = std::array< uint8_t, Cached_Hash_Size >
 Hash type. More...
 

Public Member Functions

constexpr TimestampedHash ()
 Creates a timestamped hash. More...
 
constexpr TimestampedHash (Timestamp timestamp)
 Creates a timestamped hash from a timestamp. More...
 
 TimestampedHash (Timestamp timestamp, const Hash256 &hash)
 Creates a timestamped hash from a timestamp and a hash. More...
 
constexpr bool operator< (const TimestampedHash &rhs) const
 Returns true if this timestamped hash is less than rhs. More...
 
constexpr bool operator== (const TimestampedHash &rhs) const
 Returns true if this timestamped hash is equal to rhs. More...
 
constexpr bool operator!= (const TimestampedHash &rhs) const
 Returns true if this timestamped hash is not equal to rhs. More...
 

Public Attributes

Timestamp Time
 Timestamp. More...
 
HashType Hash
 

Detailed Description

Represents a hash with attached timestamp.

Member Typedef Documentation

◆ HashType

Hash type.

Constructor & Destructor Documentation

◆ TimestampedHash() [1/3]

constexpr catapult::state::TimestampedHash::TimestampedHash ( )
inlineconstexpr

Creates a timestamped hash.

◆ TimestampedHash() [2/3]

constexpr catapult::state::TimestampedHash::TimestampedHash ( Timestamp  timestamp)
inlineexplicitconstexpr

Creates a timestamped hash from a timestamp.

◆ TimestampedHash() [3/3]

catapult::state::TimestampedHash::TimestampedHash ( Timestamp  timestamp,
const Hash256 hash 
)
inlineexplicit

Creates a timestamped hash from a timestamp and a hash.

Here is the call graph for this function:

Member Function Documentation

◆ operator!=()

constexpr bool catapult::state::TimestampedHash::operator!= ( const TimestampedHash rhs) const
inlineconstexpr

Returns true if this timestamped hash is not equal to rhs.

◆ operator<()

constexpr bool catapult::state::TimestampedHash::operator< ( const TimestampedHash rhs) const
inlineconstexpr

Returns true if this timestamped hash is less than rhs.

◆ operator==()

constexpr bool catapult::state::TimestampedHash::operator== ( const TimestampedHash rhs) const
inlineconstexpr

Returns true if this timestamped hash is equal to rhs.

Member Data Documentation

◆ Hash

HashType catapult::state::TimestampedHash::Hash

Hash.

Note
This might be a partial hash.

◆ Time

Timestamp catapult::state::TimestampedHash::Time

Timestamp.


The documentation for this struct was generated from the following file: