diff options
| author | Ross Nicoll <[email protected]> | 2017-12-28 15:04:08 +0000 |
|---|---|---|
| committer | Ross Nicoll <[email protected]> | 2018-09-19 19:24:06 +0100 |
| commit | 1be681a1b97b686f838af90682a57f2030d26015 (patch) | |
| tree | b2795e4a1d35004dbfd84d49b07bc54413a2a9e1 /src/rpc/blockchain.cpp | |
| parent | Change BIP65/66 enforcement to match Dogecoin (#1403) (diff) | |
| download | discoin-1be681a1b97b686f838af90682a57f2030d26015.tar.xz discoin-1be681a1b97b686f838af90682a57f2030d26015.zip | |
Modify chain consensus parameters to be height aware (#1396)
* Modify chain consensus parameters to be height aware
* Correct implementation of simplified rewards in parameters
* Correct max money
* Use base block version in IsSuperMajority() instead of full version
* Correct mining of blocks in AuxPoW tests
* Add in missing pre-AuxPoW consensus checks
Diffstat (limited to 'src/rpc/blockchain.cpp')
| -rw-r--r-- | src/rpc/blockchain.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/rpc/blockchain.cpp b/src/rpc/blockchain.cpp index d06c00cbc..6fb45a515 100644 --- a/src/rpc/blockchain.cpp +++ b/src/rpc/blockchain.cpp @@ -720,7 +720,7 @@ UniValue getblockheader(const JSONRPCRequest& request) if (!fVerbose) { CDataStream ssBlock(SER_NETWORK, PROTOCOL_VERSION); - ssBlock << pblockindex->GetBlockHeader(Params().GetConsensus()); + ssBlock << pblockindex->GetBlockHeader(Params().GetConsensus(pblockindex->nHeight)); std::string strHex = HexStr(ssBlock.begin(), ssBlock.end()); return strHex; } @@ -787,7 +787,7 @@ UniValue getblock(const JSONRPCRequest& request) if (fHavePruned && !(pblockindex->nStatus & BLOCK_HAVE_DATA) && pblockindex->nTx > 0) throw JSONRPCError(RPC_MISC_ERROR, "Block not available (pruned data)"); - if (!ReadBlockFromDisk(block, pblockindex, Params().GetConsensus())) + if (!ReadBlockFromDisk(block, pblockindex, Params().GetConsensus(pblockindex->nHeight))) // Block not found on disk. This could be because we have the block // header in our index but don't have the block (for example if a // non-whitelisted node sends us an unrequested long chain of valid @@ -1185,7 +1185,7 @@ UniValue getblockchaininfo(const JSONRPCRequest& request) obj.push_back(Pair("chainwork", chainActive.Tip()->nChainWork.GetHex())); obj.push_back(Pair("pruned", fPruneMode)); - const Consensus::Params& consensusParams = Params().GetConsensus(); + const Consensus::Params& consensusParams = Params().GetConsensus(0); CBlockIndex* tip = chainActive.Tip(); UniValue softforks(UniValue::VARR); UniValue bip9_softforks(UniValue::VOBJ); |