"getmininginfo\n"
"Returns an object containing mining-related information.");
- uint64 nMinWeight = 0, nMaxWeight = 0, nWeight = 0;
- pwalletMain->GetStakeWeight(*pwalletMain, nMinWeight, nMaxWeight, nWeight);
+ float nKernelsRate = 0, nCoinDaysRate = 0;
+ pwalletMain->GetStakeStats(nKernelsRate, nCoinDaysRate);
Object obj, diff, weight;
obj.push_back(Pair("blocks", (int)nBestHeight));
obj.push_back(Pair("errors", GetWarnings("statusbar")));
obj.push_back(Pair("pooledtx", (uint64_t)mempool.size()));
- weight.push_back(Pair("minimum", (uint64_t)nMinWeight));
- weight.push_back(Pair("maximum", (uint64_t)nMaxWeight));
- weight.push_back(Pair("combined", (uint64_t)nWeight));
- obj.push_back(Pair("stakeweight", weight));
+ weight.push_back(Pair("kernelsrate", nKernelsRate));
+ weight.push_back(Pair("cdaysrate", nCoinDaysRate));
+ obj.push_back(Pair("stakestats", weight));
obj.push_back(Pair("stakeinterest", (uint64_t)GetProofOfStakeReward(0, GetLastBlockIndex(pindexBest, true)->nBits, GetLastBlockIndex(pindexBest, true)->nTime, true)));
obj.push_back(Pair("testnet", fTestNet));
// Update block
static unsigned int nTransactionsUpdatedLast;
static CBlockIndex* pindexPrev;
- static int64 nStart;
+ static int64_t nStart;
static CBlock* pblock;
if (pindexPrev != pindexBest ||
(nTransactionsUpdated != nTransactionsUpdatedLast && GetTime() - nStart > 60))
// Update block
static unsigned int nTransactionsUpdatedLast;
static CBlockIndex* pindexPrev;
- static int64 nStart;
+ static int64_t nStart;
static CBlock* pblock;
if (pindexPrev != pindexBest ||
(nTransactionsUpdated != nTransactionsUpdatedLast && GetTime() - nStart > 60))
// Update block
static unsigned int nTransactionsUpdatedLast;
static CBlockIndex* pindexPrev;
- static int64 nStart;
+ static int64_t nStart;
static CBlock* pblock;
if (pindexPrev != pindexBest ||
(nTransactionsUpdated != nTransactionsUpdatedLast && GetTime() - nStart > 5))