obj.push_back(Pair("difficulty", diff));
obj.push_back(Pair("blockvalue", (uint64_t)GetProofOfWorkReward(GetLastBlockIndex(pindexBest, false)->nBits)));
- obj.push_back(Pair("netmhashps", GetPoWMHashPS()));
- obj.push_back(Pair("netstakeweight", GetPoSKernelPS()));
+ obj.push_back(Pair("netmhashps", GetPoWMHashPS()));
+ obj.push_back(Pair("netstakeweight",GetPoSKernelPS()));
obj.push_back(Pair("errors", GetWarnings("statusbar")));
obj.push_back(Pair("pooledtx", (uint64_t)mempool.size()));
- obj.push_back(Pair("stakeinputs", (uint64_t)nStakeInputsMapSize));
- obj.push_back(Pair("stakeinterest", (int64_t)GetProofOfStakeReward(0, GetLastBlockIndex(pindexBest, true)->nBits, GetLastBlockIndex(pindexBest, true)->nTime, true)));
+ obj.push_back(Pair("stakeinputs", (uint64_t)nStakeInputsMapSize));
+ obj.push_back(Pair("stakeinterest", GetProofOfStakeReward(0, GetLastBlockIndex(pindexBest, true)->nBits, GetLastBlockIndex(pindexBest, true)->nTime, true)));
obj.push_back(Pair("testnet", fTestNet));
return obj;
SHA256_CTX ctx;
GetKernelMidstate(nStakeModifier, block.nTime, txindex.pos.nTxPos - txindex.pos.nBlockPos, tx.nTime, nOut, ctx);
- std::pair<uint256, uint32_t> solution;
- if (ScanMidstateForward(ctx, nBits, tx.nTime, tx.vout[nOut].nValue, interval, solution))
+ std::vector<std::pair<uint256, uint32_t> > solutions;
+ if (ScanMidstateForward(ctx, nBits, tx.nTime, tx.vout[nOut].nValue, interval, solutions))
{
- Object r;
- r.push_back(Pair("hash", solution.first.GetHex()));
- r.push_back(Pair("time", DateTimeStrFormat(solution.second)));
+ Array sols;
- return r;
+ BOOST_FOREACH(const PAIRTYPE(uint256, uint32_t) solution, solutions)
+ {
+
+ Object r;
+ r.push_back(Pair("hash", solution.first.GetHex()));
+ r.push_back(Pair("time", DateTimeStrFormat(solution.second)));
+
+ sols.push_back(r);
+ }
+
+ return sols;
}
}
else