CatapultServer  v0.5.0.1 (Elephant)
catapult::extensions::LocalNodeChainScore Class Reference
Collaboration diagram for catapult::extensions::LocalNodeChainScore:

Public Member Functions

 LocalNodeChainScore ()=default
 Creates a default local node chain score. More...
 
 LocalNodeChainScore (const model::ChainScore &score)
 Creates a local node chain score around score. More...
 
model::ChainScore get () const
 Gets the current chain score. More...
 
void set (const model::ChainScore &chainScore)
 Sets the current chain score to chainScore. More...
 
LocalNodeChainScoreoperator+= (const model::ChainScore &rhs)
 Adds rhs to this chain score. More...
 

Private Attributes

model::ChainScore m_score
 
utils::SpinReaderWriterLock m_lock
 

Detailed Description

Chain score stored by the local node.

Note
This score is synchronized by a reader writer lock.

Constructor & Destructor Documentation

◆ LocalNodeChainScore() [1/2]

catapult::extensions::LocalNodeChainScore::LocalNodeChainScore ( )
default

Creates a default local node chain score.

◆ LocalNodeChainScore() [2/2]

catapult::extensions::LocalNodeChainScore::LocalNodeChainScore ( const model::ChainScore score)
inlineexplicit

Creates a local node chain score around score.

Member Function Documentation

◆ get()

model::ChainScore catapult::extensions::LocalNodeChainScore::get ( ) const
inline

Gets the current chain score.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator+=()

LocalNodeChainScore& catapult::extensions::LocalNodeChainScore::operator+= ( const model::ChainScore rhs)
inline

Adds rhs to this chain score.

Here is the call graph for this function:

◆ set()

void catapult::extensions::LocalNodeChainScore::set ( const model::ChainScore chainScore)
inline

Sets the current chain score to chainScore.

Here is the call graph for this function:

Member Data Documentation

◆ m_lock

utils::SpinReaderWriterLock catapult::extensions::LocalNodeChainScore::m_lock
mutableprivate

◆ m_score

model::ChainScore catapult::extensions::LocalNodeChainScore::m_score
private

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