PRCYCoin  2.0.0.7rc1
P2P Digital Currency
Functions | Variables
poa.cpp File Reference
#include "poa.h"
#include "chain.h"
#include "chainparams.h"
#include "main.h"
#include "primitives/block.h"
#include "uint256.h"
#include "util.h"
#include <math.h>
Include dependency graph for poa.cpp:

Go to the source code of this file.

Functions

unsigned int GetNextWorkRequired (const CBlockIndex *pindexLast, const CBlockHeader *pblock)
 
bool CheckProofOfWork (uint256 hash, unsigned int nBits)
 Check whether a block hash satisfies the proof-of-work requirement specified by nBits. More...
 
uint256 GetBlockProof (const CBlockIndex &block)
 
CBlockIndexFindPrevPoSBlock (CBlockIndex *p)
 
bool CheckPoAContainRecentHash (const CBlock &block)
 
bool CheckNumberOfAuditedPoSBlocks (const CBlock &block, const CBlockIndex *pindex)
 
bool CheckPoABlockMinedHash (const CBlockHeader &block)
 Check whether a block hash satisfies the proof-of-work requirement specified by nBits. More...
 
bool CheckPrevPoABlockHash (const CBlockHeader &block)
 
bool CheckPoAMerkleRoot (const CBlock &block, bool *fMutate)
 
bool CheckPoABlockNotContainingPoABlockInfo (const CBlock &block, const CBlockIndex *pindex)
 
bool CheckPoAblockTime (const CBlock &block)
 
bool CheckPoABlockNotAuditingOverlap (const CBlock &block)
 
bool CheckPoABlockRewardAmount (const CBlock &block, const CBlockIndex *pindex)
 
bool CheckPoABlockPaddingAmount (const CBlock &block, const CBlockIndex *pindex)
 
bool IsFixedAudit (std::string txid, int nHeight)
 
bool IsWrongAudit (std::string txid, int nHeight)
 

Variables

unsigned int N_BITS = 0x1e050000
 
unsigned int N_BITS_SF = 0x1e127ff8
 
unsigned int N_BITS_PD = 0x1e02b2dc
 

Function Documentation

◆ CheckNumberOfAuditedPoSBlocks()

bool CheckNumberOfAuditedPoSBlocks ( const CBlock block,
const CBlockIndex pindex 
)

Definition at line 314 of file poa.cpp.

Here is the call graph for this function:

◆ CheckPoABlockMinedHash()

bool CheckPoABlockMinedHash ( const CBlockHeader block)

Check whether a block hash satisfies the proof-of-work requirement specified by nBits.

Definition at line 331 of file poa.cpp.

Here is the call graph for this function:

◆ CheckPoABlockNotAuditingOverlap()

bool CheckPoABlockNotAuditingOverlap ( const CBlock block)

Definition at line 445 of file poa.cpp.

Here is the call graph for this function:

◆ CheckPoABlockNotContainingPoABlockInfo()

bool CheckPoABlockNotContainingPoABlockInfo ( const CBlock block,
const CBlockIndex pindex 
)

Definition at line 400 of file poa.cpp.

Here is the call graph for this function:

◆ CheckPoABlockPaddingAmount()

bool CheckPoABlockPaddingAmount ( const CBlock block,
const CBlockIndex pindex 
)

Definition at line 500 of file poa.cpp.

Here is the call graph for this function:

◆ CheckPoABlockRewardAmount()

bool CheckPoABlockRewardAmount ( const CBlock block,
const CBlockIndex pindex 
)

Definition at line 483 of file poa.cpp.

Here is the call graph for this function:

◆ CheckPoAblockTime()

bool CheckPoAblockTime ( const CBlock block)

Definition at line 422 of file poa.cpp.

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

◆ CheckPoAContainRecentHash()

bool CheckPoAContainRecentHash ( const CBlock block)

Definition at line 192 of file poa.cpp.

Here is the call graph for this function:

◆ CheckPoAMerkleRoot()

bool CheckPoAMerkleRoot ( const CBlock block,
bool *  fMutate 
)

Definition at line 390 of file poa.cpp.

Here is the call graph for this function:

◆ CheckPrevPoABlockHash()

bool CheckPrevPoABlockHash ( const CBlockHeader block)

Definition at line 359 of file poa.cpp.

Here is the call graph for this function:

◆ CheckProofOfWork()

bool CheckProofOfWork ( uint256  hash,
unsigned int  nBits 
)

Check whether a block hash satisfies the proof-of-work requirement specified by nBits.

Definition at line 145 of file poa.cpp.

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

◆ FindPrevPoSBlock()

CBlockIndex* FindPrevPoSBlock ( CBlockIndex p)

Definition at line 186 of file poa.cpp.

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

◆ GetBlockProof()

uint256 GetBlockProof ( const CBlockIndex block)

Definition at line 171 of file poa.cpp.

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

◆ GetNextWorkRequired()

unsigned int GetNextWorkRequired ( const CBlockIndex pindexLast,
const CBlockHeader pblock 
)

Definition at line 24 of file poa.cpp.

Here is the call graph for this function:

◆ IsFixedAudit()

bool IsFixedAudit ( std::string  txid,
int  nHeight 
)

Definition at line 534 of file poa.cpp.

Here is the caller graph for this function:

◆ IsWrongAudit()

bool IsWrongAudit ( std::string  txid,
int  nHeight 
)

Definition at line 540 of file poa.cpp.

Here is the caller graph for this function:

Variable Documentation

◆ N_BITS

unsigned int N_BITS = 0x1e050000

Definition at line 20 of file poa.cpp.

◆ N_BITS_PD

unsigned int N_BITS_PD = 0x1e02b2dc

Definition at line 22 of file poa.cpp.

◆ N_BITS_SF

unsigned int N_BITS_SF = 0x1e127ff8

Definition at line 21 of file poa.cpp.