message: Add hash/kernel per second
diff: #include "utilstrencodings.h"
  #include "hash.h"
  #include "libdevcore/CommonData.h"
  +#include "pos.h"
  #include <stdint.h>
  @@ -76,6 +77,69 @@ double GetDifficulty(const CBlockIndex* blockindex)
  return dDiff;
  }
  +double GetPoWMHashPS()
  +{
  + if (pindexBestHeader->nHeight >= Params().GetConsensus().nLastPOWBlock)//toniqtum edit
  + return 0;
  +
  + int nPoWInterval = 72;
  + int64_t nTargetSpacingWorkMin = 30, nTargetSpacingWork = 30;
  +
  + CBlockIndex* pindexGenesisBlock = chainActive.Genesis();
  + CBlockIndex* pindex = pindexGenesisBlock;
  + CBlockIndex* pindexPrevWork = pindexGenesisBlock;
  +
  + while (pindex)
  + {
  + if (pindex->IsProofOfWork())
  + {
  + int64_t nActualSpacingWork = pindex->GetBlockTime() - pindexPrevWork->GetBlockTime();
  + nTargetSpacingWork = ((nPoWInterval - 1) * nTargetSpacingWork + nActualSpacingWork + nActualSpacingWork) / (nPoWInterval + 1);
  + nTargetSpacingWork = max(nTargetSpacingWork, nTargetSpacingWorkMin);
  + pindexPrevWork = pindex;
  + }
  +
  + pindex = pindex->pnext;
  + }
  +
  + return GetDifficulty() * 4294.967296 / nTargetSpacingWork;
  +}
  +
  +double GetPoSKernelPS()
  +{
  + int nPoSInterval = 72;
  + double dStakeKernelsTriedAvg = 0;
  + int nStakesHandled = 0, nStakesTime = 0;
  +
  + CBlockIndex* pindex = pindexBestHeader;
  + CBlockIndex* pindexPrevStake = NULL;
  +
  + while (pindex && nStakesHandled < nPoSInterval)
  + {
  + if (pindex->IsProofOfStake())
  + {
  + if (pindexPrevStake)
  + {
  + dStakeKernelsTriedAvg += GetDifficulty(pindexPrevStake) * 4294967296.0;
  + nStakesTime += pindexPrevStake->nTime - pindex->nTime;
  + nStakesHandled++;
  + }
  + pindexPrevStake = pindex;
  + }
  +
  + pindex = pindex->pprev;
  + }
  +
  + double result = 0;
  +
  + if (nStakesTime)
  + result = dStakeKernelsTriedAvg / nStakesTime;
  +
  + result *= STAKE_TIMESTAMP_MASK + 1;
  +
  + return result;
  +}
  +
  UniValue blockheaderToJSON(const CBlockIndex* blockindex)
  {
  UniValue result(UniValue::VOBJ);
  