PRCYCoin  2.0.0.7rc1
P2P Digital Currency
Functions | Variables
kernel.cpp File Reference
#include <boost/assign/list_of.hpp>
#include "db.h"
#include "kernel.h"
#include "script/interpreter.h"
#include "timedata.h"
#include "util.h"
#include "stakeinput.h"
#include "utilmoneystr.h"
Include dependency graph for kernel.cpp:

Go to the source code of this file.

Functions

unsigned int getIntervalVersion (bool fTestNet)
 
int64_t GetWeight (int64_t nIntervalBeginning, int64_t nIntervalEnd)
 
bool ComputeNextStakeModifier (const CBlockIndex *pindexPrev, uint64_t &nStakeModifier, bool &fGeneratedStakeModifier)
 
bool GetKernelStakeModifier (uint256 hashBlockFrom, uint64_t &nStakeModifier, int &nStakeModifierHeight, int64_t &nStakeModifierTime, bool fPrintProofOfStake)
 
bool stakeTargetHit (const uint256 &hashProofOfStake, const int64_t &nValueIn, const uint256 &bnTargetPerCoinDay)
 
bool CheckStake (const CDataStream &ssUniqueID, CAmount nValueIn, const uint64_t nStakeModifier, const uint256 &bnTarget, unsigned int nTimeBlockFrom, unsigned int &nTimeTx, uint256 &hashProofOfStake)
 
bool Stake (CStakeInput *stakeInput, unsigned int nBits, unsigned int nTimeBlockFrom, unsigned int &nTimeTx, uint256 &hashProofOfStake)
 
bool CheckProofOfStake (const CBlock block, uint256 &hashProofOfStake, std::unique_ptr< CStakeInput > &stake, int nPreviousBlockHeight)
 
unsigned int GetStakeModifierChecksum (const CBlockIndex *pindex)
 
bool CheckStakeModifierCheckpoints (int nHeight, unsigned int nStakeModifierChecksum)
 

Variables

bool fTestNet = false
 
unsigned int nModifierInterval
 
int nStakeTargetSpacing = 60
 

Function Documentation

◆ CheckProofOfStake()

bool CheckProofOfStake ( const CBlock  block,
uint256 hashProofOfStake,
std::unique_ptr< CStakeInput > &  stake,
int  nPreviousBlockHeight 
)

Definition at line 351 of file kernel.cpp.

Here is the call graph for this function:

◆ CheckStake()

bool CheckStake ( const CDataStream ssUniqueID,
CAmount  nValueIn,
const uint64_t  nStakeModifier,
const uint256 bnTarget,
unsigned int  nTimeBlockFrom,
unsigned int &  nTimeTx,
uint256 hashProofOfStake 
)

Definition at line 289 of file kernel.cpp.

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

◆ CheckStakeModifierCheckpoints()

bool CheckStakeModifierCheckpoints ( int  nHeight,
unsigned int  nStakeModifierChecksum 
)

Definition at line 433 of file kernel.cpp.

Here is the caller graph for this function:

◆ ComputeNextStakeModifier()

bool ComputeNextStakeModifier ( const CBlockIndex pindexPrev,
uint64_t &  nStakeModifier,
bool &  fGeneratedStakeModifier 
)

Definition at line 150 of file kernel.cpp.

Here is the caller graph for this function:

◆ getIntervalVersion()

unsigned int getIntervalVersion ( bool  fTestNet)

Definition at line 24 of file kernel.cpp.

◆ GetKernelStakeModifier()

bool GetKernelStakeModifier ( uint256  hashBlockFrom,
uint64_t &  nStakeModifier,
int &  nStakeModifierHeight,
int64_t &  nStakeModifierTime,
bool  fPrintProofOfStake 
)

Definition at line 245 of file kernel.cpp.

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

◆ GetStakeModifierChecksum()

unsigned int GetStakeModifierChecksum ( const CBlockIndex pindex)

Definition at line 419 of file kernel.cpp.

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

◆ GetWeight()

int64_t GetWeight ( int64_t  nIntervalBeginning,
int64_t  nIntervalEnd 
)

Definition at line 37 of file kernel.cpp.

Here is the call graph for this function:

◆ Stake()

bool Stake ( CStakeInput stakeInput,
unsigned int  nBits,
unsigned int  nTimeBlockFrom,
unsigned int &  nTimeTx,
uint256 hashProofOfStake 
)

Definition at line 301 of file kernel.cpp.

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

◆ stakeTargetHit()

bool stakeTargetHit ( const uint256 hashProofOfStake,
const int64_t &  nValueIn,
const uint256 bnTargetPerCoinDay 
)

Definition at line 280 of file kernel.cpp.

Here is the caller graph for this function:

Variable Documentation

◆ fTestNet

bool fTestNet = false

Definition at line 18 of file kernel.cpp.

◆ nModifierInterval

unsigned int nModifierInterval

Definition at line 22 of file kernel.cpp.

◆ nStakeTargetSpacing

int nStakeTargetSpacing = 60

Definition at line 23 of file kernel.cpp.