mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 20:12:57 +01:00
Made CSuperblockManager::IsValidSuperblockHeight an inline function
This is for efficiency since this function is called often and is only 1 line of code.
This commit is contained in:
parent
c7f9e11575
commit
92adc98380
@ -218,18 +218,6 @@ std::vector<CSuperblock_sptr> CGovernanceTriggerManager::GetActiveTriggers()
|
||||
DBG( cout << "GetActiveTriggers: vecResults.size() = " << vecResults.size() << endl; );
|
||||
|
||||
return vecResults;
|
||||
}
|
||||
|
||||
/**
|
||||
* Is Valid Superblock Height
|
||||
*
|
||||
* - See if this block can be a superblock
|
||||
*/
|
||||
|
||||
bool CSuperblockManager::IsValidSuperblockHeight(int nBlockHeight)
|
||||
{
|
||||
// SUPERBLOCKS CAN HAPPEN ONCE PER DAY
|
||||
return nBlockHeight % Params().GetConsensus().nSuperblockCycle;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -98,7 +98,17 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool IsValidSuperblockHeight(int nBlockHeight);
|
||||
/**
|
||||
* Is Valid Superblock Height
|
||||
*
|
||||
* - See if this block can be a superblock
|
||||
*/
|
||||
static bool IsValidSuperblockHeight(int nBlockHeight)
|
||||
{
|
||||
// SUPERBLOCKS CAN HAPPEN ONCE PER DAY
|
||||
return nBlockHeight % Params().GetConsensus().nSuperblockCycle;
|
||||
}
|
||||
|
||||
static bool IsSuperblockTriggered(int nBlockHeight);
|
||||
static void CreateSuperblock(CMutableTransaction& txNew, CAmount nFees, int nBlockHeight);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user