Compare commits
1 Commits
v1.0.1
...
sapling-pe
| Author | SHA1 | Date | |
|---|---|---|---|
| 752590348b |
@@ -32,8 +32,12 @@ class CChainPower;
|
|||||||
#include <boost/foreach.hpp>
|
#include <boost/foreach.hpp>
|
||||||
|
|
||||||
extern bool fZindex;
|
extern bool fZindex;
|
||||||
static const int SPROUT_VALUE_VERSION = 1001400;
|
// These version thresholds control whether nSproutValue/nSaplingValue are
|
||||||
static const int SAPLING_VALUE_VERSION = 1010100;
|
// serialized in the block index. They must be <= CLIENT_VERSION or the
|
||||||
|
// values will never be persisted, causing nChainSaplingValue to reset
|
||||||
|
// to 0 after node restart. DragonX CLIENT_VERSION is 1000150 (v1.0.1.50).
|
||||||
|
static const int SPROUT_VALUE_VERSION = 1000000;
|
||||||
|
static const int SAPLING_VALUE_VERSION = 1000000;
|
||||||
extern int32_t ASSETCHAINS_LWMAPOS;
|
extern int32_t ASSETCHAINS_LWMAPOS;
|
||||||
extern char SMART_CHAIN_SYMBOL[65];
|
extern char SMART_CHAIN_SYMBOL[65];
|
||||||
extern uint64_t ASSETCHAINS_NOTARY_PAY[];
|
extern uint64_t ASSETCHAINS_NOTARY_PAY[];
|
||||||
|
|||||||
@@ -322,6 +322,15 @@ UniValue blockToJSON(const CBlock& block, const CBlockIndex* blockindex, bool tx
|
|||||||
result.push_back(Pair("anchor", blockindex->hashFinalSproutRoot.GetHex()));
|
result.push_back(Pair("anchor", blockindex->hashFinalSproutRoot.GetHex()));
|
||||||
result.push_back(Pair("blocktype", "mined"));
|
result.push_back(Pair("blocktype", "mined"));
|
||||||
|
|
||||||
|
// Report block subsidy and fees separately so explorers don't have to
|
||||||
|
// reimplement the reward schedule to display them.
|
||||||
|
CAmount nSubsidy = GetBlockSubsidy(blockindex->GetHeight(), Params().GetConsensus());
|
||||||
|
CAmount nCoinbase = block.vtx[0].GetValueOut();
|
||||||
|
CAmount nFees = nCoinbase - nSubsidy;
|
||||||
|
if (nFees < 0) nFees = 0; // block 1 has premine, avoid negative
|
||||||
|
result.push_back(Pair("subsidy", ValueFromAmount(nSubsidy)));
|
||||||
|
result.push_back(Pair("fees", ValueFromAmount(nFees)));
|
||||||
|
|
||||||
UniValue valuePools(UniValue::VARR);
|
UniValue valuePools(UniValue::VARR);
|
||||||
valuePools.push_back(ValuePoolDesc("sapling", blockindex->nChainSaplingValue, blockindex->nSaplingValue));
|
valuePools.push_back(ValuePoolDesc("sapling", blockindex->nChainSaplingValue, blockindex->nSaplingValue));
|
||||||
result.push_back(Pair("valuePools", valuePools));
|
result.push_back(Pair("valuePools", valuePools));
|
||||||
|
|||||||
Reference in New Issue
Block a user