#include "kernel.h"
#include "txdb.h"
-#include "main.h"
+
+extern unsigned int nStakeMaxAge;
+extern unsigned int nStakeTargetSpacing;
using namespace std;
}
// Scan given coins set for kernel solution
-bool ScanForStakeKernelHash(MetaMap &mapMeta, KernelSearchSettings &settings, CoinsSet::value_type &kernelcoin, unsigned int &nTimeTx, unsigned int &nBlockTime)
+bool ScanForStakeKernelHash(MetaMap &mapMeta, KernelSearchSettings &settings, CoinsSet::value_type &kernelcoin, unsigned int &nTimeTx, unsigned int &nBlockTime, uint64 &nKernelsTried, uint64 &nCoinDaysTried)
{
uint256 hashProofOfStake = 0;
// Calculate kernel hash
hashProofOfStake = Hash(ss.begin(), ss.end());
+ // Update statistics
+ nKernelsTried += 1;
+ nCoinDaysTried += bnCoinDayWeight.getuint64();
+
if (bnTargetProofOfStake >= CBigNum(hashProofOfStake))
{
if (fDebug)