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/miner.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/miner.cpp')
| -rw-r--r-- | src/miner.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/miner.cpp b/src/miner.cpp index a6ed42d00..f83f43ceb 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -102,12 +102,12 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn) CBlock *pblock = &pblocktemplate->block; // pointer for convenience /* Initialise the block version. */ - pblock->nVersion.SetBaseVersion(CBlockHeader::CURRENT_VERSION); + pblock->nVersion = CBlockHeader::CURRENT_VERSION; // -regtest only: allow overriding block.nVersion with // -blockversion=N to test forking scenarios if (Params().MineBlocksOnDemand()) - pblock->nVersion.SetBaseVersion(GetArg("-blockversion", pblock->nVersion.GetBaseVersion())); + pblock->nVersion = GetArg("-blockversion", pblock->nVersion); // Create coinbase tx CMutableTransaction txNew; @@ -420,7 +420,7 @@ CBlockTemplate* CreateNewBlockWithKey(CReserveKey& reservekey) return CreateNewBlock(scriptPubKey); } -bool ProcessBlockFound(CBlock* pblock, CWallet& wallet, CReserveKey& reservekey) +static bool ProcessBlockFound(CBlock* pblock, CWallet& wallet, CReserveKey& reservekey) { LogPrintf("%s\n", pblock->ToString()); LogPrintf("generated %s\n", FormatMoney(pblock->vtx[0].vout[0].nValue)); |