PIVX Core  5.6.99
P2P Digital Currency
Classes | Macros | Typedefs | Functions | Variables
deterministicmns.h File Reference
#include "arith_uint256.h"
#include "bls/bls_wrapper.h"
#include "dbwrapper.h"
#include "evo/evodb.h"
#include "evo/providertx.h"
#include "llmq/quorums_commitment.h"
#include "netaddress.h"
#include "saltedhasher.h"
#include "serialize.h"
#include "sync.h"
#include "version.h"
#include <immer/map.hpp>
#include <immer/map_transient.hpp>
#include <unordered_map>
Include dependency graph for deterministicmns.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  CDeterministicMNState
 
class  CDeterministicMNStateDiff
 
class  CDeterministicMN
 
class  CDeterministicMNList
 
class  CDeterministicMNListDiff
 
class  CDeterministicMNManager
 

Macros

#define DMN_STATE_DIFF_ALL_FIELDS
 
#define DMN_STATE_DIFF_LINE(f)   if (a.f != b.f) { state.f = b.f; fields |= Field_##f; }
 
#define DMN_STATE_DIFF_LINE(f)   if (obj.fields & Field_##f) READWRITE(obj.state.f);
 
#define DMN_STATE_DIFF_LINE(f)   if (fields & Field_##f) target.f = state.f;
 

Typedefs

typedef std::shared_ptr< CDeterministicMNStateCDeterministicMNStatePtr
 
typedef std::shared_ptr< const CDeterministicMNStateCDeterministicMNStateCPtr
 
typedef std::shared_ptr< const CDeterministicMNCDeterministicMNCPtr
 

Functions

template<typename Stream , typename K , typename T , typename Hash , typename Equal >
void SerializeImmerMap (Stream &os, const immer::map< K, T, Hash, Equal > &m)
 
template<typename Stream , typename K , typename T , typename Hash , typename Equal >
void UnserializeImmerMap (Stream &is, immer::map< K, T, Hash, Equal > &m)
 
template<typename Stream , typename K , typename T , typename Hash , typename Equal >
void SerReadWrite (Stream &s, const immer::map< K, T, Hash, Equal > &m, CSerActionSerialize ser_action)
 
template<typename Stream , typename K , typename T , typename Hash , typename Equal >
void SerReadWrite (Stream &s, immer::map< K, T, Hash, Equal > &obj, CSerActionUnserialize ser_action)
 

Variables

std::unique_ptr< CDeterministicMNManagerdeterministicMNManager
 

Macro Definition Documentation

◆ DMN_STATE_DIFF_ALL_FIELDS

#define DMN_STATE_DIFF_ALL_FIELDS
Value:
DMN_STATE_DIFF_LINE(nRegisteredHeight) \
DMN_STATE_DIFF_LINE(nLastPaidHeight) \
DMN_STATE_DIFF_LINE(nPoSePenalty) \
DMN_STATE_DIFF_LINE(nPoSeRevivedHeight) \
DMN_STATE_DIFF_LINE(nPoSeBanHeight) \
DMN_STATE_DIFF_LINE(nRevocationReason) \
DMN_STATE_DIFF_LINE(confirmedHash) \
DMN_STATE_DIFF_LINE(confirmedHashWithProRegTxHash) \
DMN_STATE_DIFF_LINE(keyIDOwner) \
DMN_STATE_DIFF_LINE(pubKeyOperator) \
DMN_STATE_DIFF_LINE(keyIDVoting) \
DMN_STATE_DIFF_LINE(addr) \
DMN_STATE_DIFF_LINE(scriptPayout) \
DMN_STATE_DIFF_LINE(scriptOperatorPayout)
#define DMN_STATE_DIFF_LINE(f)

Definition at line 134 of file deterministicmns.h.

◆ DMN_STATE_DIFF_LINE [1/3]

#define DMN_STATE_DIFF_LINE (   f)    if (a.f != b.f) { state.f = b.f; fields |= Field_##f; }

◆ DMN_STATE_DIFF_LINE [2/3]

#define DMN_STATE_DIFF_LINE (   f)    if (obj.fields & Field_##f) READWRITE(obj.state.f);

◆ DMN_STATE_DIFF_LINE [3/3]

#define DMN_STATE_DIFF_LINE (   f)    if (fields & Field_##f) target.f = state.f;

Typedef Documentation

◆ CDeterministicMNCPtr

typedef std::shared_ptr<const CDeterministicMN> CDeterministicMNCPtr

Definition at line 227 of file deterministicmns.h.

◆ CDeterministicMNStateCPtr

typedef std::shared_ptr<const CDeterministicMNState> CDeterministicMNStateCPtr

Definition at line 112 of file deterministicmns.h.

◆ CDeterministicMNStatePtr

Definition at line 111 of file deterministicmns.h.

Function Documentation

◆ SerializeImmerMap()

template<typename Stream , typename K , typename T , typename Hash , typename Equal >
void SerializeImmerMap ( Stream &  os,
const immer::map< K, T, Hash, Equal > &  m 
)

Definition at line 232 of file deterministicmns.h.

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

◆ SerReadWrite() [1/2]

template<typename Stream , typename K , typename T , typename Hash , typename Equal >
void SerReadWrite ( Stream &  s,
const immer::map< K, T, Hash, Equal > &  m,
CSerActionSerialize  ser_action 
)
inline

Definition at line 254 of file deterministicmns.h.

Here is the call graph for this function:

◆ SerReadWrite() [2/2]

template<typename Stream , typename K , typename T , typename Hash , typename Equal >
void SerReadWrite ( Stream &  s,
immer::map< K, T, Hash, Equal > &  obj,
CSerActionUnserialize  ser_action 
)
inline

Definition at line 260 of file deterministicmns.h.

Here is the call graph for this function:

◆ UnserializeImmerMap()

template<typename Stream , typename K , typename T , typename Hash , typename Equal >
void UnserializeImmerMap ( Stream &  is,
immer::map< K, T, Hash, Equal > &  m 
)

Definition at line 240 of file deterministicmns.h.

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

Variable Documentation

◆ deterministicMNManager

std::unique_ptr<CDeterministicMNManager> deterministicMNManager
extern

Definition at line 27 of file deterministicmns.cpp.