diff options
| author | Ross Nicoll <[email protected]> | 2015-07-05 17:45:38 +0100 |
|---|---|---|
| committer | Ross Nicoll <[email protected]> | 2015-07-10 20:23:14 +0100 |
| commit | c453bcc9e5fd98ae4aebd1f2fc85192b5fd7410a (patch) | |
| tree | 0422e17d73ffc244e48ba41c4ea63cd39c8b09dd /src/rpcblockchain.cpp | |
| parent | Merge AuxPoW support from Namecore (diff) | |
| download | discoin-c453bcc9e5fd98ae4aebd1f2fc85192b5fd7410a.tar.xz discoin-c453bcc9e5fd98ae4aebd1f2fc85192b5fd7410a.zip | |
Adapt AuxPoW to Dogecoin
Changed AuxPoW parent block hashing to use Scrypt rather than SHA256 hash.
Update chain parameters to match Dogecoin
Move CheckProofOfWork into dogecoin.cpp and rename it to CheckAuxPowProofOfWork.
Add operator overrides to CBlockVersion so that naive usage operates on the underlying version without chain ID or flags.
Modify RPC mining to more closely match existing submitblock() structure
Diffstat (limited to 'src/rpcblockchain.cpp')
| -rw-r--r-- | src/rpcblockchain.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/rpcblockchain.cpp b/src/rpcblockchain.cpp index 3d4cfcd21..e4ef47884 100644 --- a/src/rpcblockchain.cpp +++ b/src/rpcblockchain.cpp @@ -6,6 +6,7 @@ #include "checkpoints.h" #include "consensus/validation.h" #include "core_io.h" +#include "dogecoin.h" #include "main.h" #include "primitives/transaction.h" #include "rpcserver.h" @@ -53,7 +54,7 @@ double GetDifficulty(const CBlockIndex* blockindex) return dDiff; } -static Object AuxpowToJSON(const CAuxPow& auxpow) +static Object auxpowToJSON(const CAuxPow& auxpow) { Object tx; tx.push_back(Pair("hex", EncodeHexTx(auxpow))); @@ -65,12 +66,12 @@ static Object AuxpowToJSON(const CAuxPow& auxpow) result.push_back(Pair("chainindex", auxpow.nChainIndex)); Array branch; - BOOST_FOREACH(const uint256& node, auxpow.vMerkleBranch) + BOOST_FOREACH (const uint256& node, auxpow.vMerkleBranch) branch.push_back(node.GetHex()); result.push_back(Pair("merklebranch", branch)); branch.clear(); - BOOST_FOREACH(const uint256& node, auxpow.vChainMerkleBranch) + BOOST_FOREACH (const uint256& node, auxpow.vChainMerkleBranch) branch.push_back(node.GetHex()); result.push_back(Pair("chainmerklebranch", branch)); @@ -115,7 +116,7 @@ Object blockToJSON(const CBlock& block, const CBlockIndex* blockindex, bool txDe result.push_back(Pair("chainwork", blockindex->nChainWork.GetHex())); if (block.auxpow) - result.push_back(Pair("auxpow", AuxpowToJSON(*block.auxpow))); + result.push_back(Pair("auxpow", auxpowToJSON(*block.auxpow))); if (blockindex->pprev) result.push_back(Pair("previousblockhash", blockindex->pprev->GetBlockHash().GetHex())); |