diff options
| author | Ross Nicoll <[email protected]> | 2015-07-28 18:24:27 +0000 |
|---|---|---|
| committer | Ross Nicoll <[email protected]> | 2015-07-28 18:24:27 +0000 |
| commit | 20278f5f5fac67114840d092126b1cae154ee99b (patch) | |
| tree | 8087d25c9852afdedf19f3f48ae06d48a6916ce4 | |
| parent | Merge pull request #1205 from rnicoll/1.10-genesis-checks (diff) | |
| download | discoin-20278f5f5fac67114840d092126b1cae154ee99b.tar.xz discoin-20278f5f5fac67114840d092126b1cae154ee99b.zip | |
Minor AuxPoW fixes
Replaced references to Namecoin with Dogecoin
Set chain ID when constructing a new block to be mined
Added assignment overload so that assigning one BlockVersion to another does a full copy.
| -rw-r--r-- | src/miner.cpp | 1 | ||||
| -rw-r--r-- | src/primitives/pureheader.h | 6 | ||||
| -rw-r--r-- | src/rpcmining.cpp | 4 |
3 files changed, 9 insertions, 2 deletions
diff --git a/src/miner.cpp b/src/miner.cpp index 70968ee50..94fe07dbf 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -103,6 +103,7 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn) /* Initialise the block version. */ pblock->nVersion = CBlockHeader::CURRENT_VERSION; + pblock->nVersion.SetChainId(chainparams.GetConsensus(0).nAuxpowChainId); // -regtest only: allow overriding block.nVersion with // -blockversion=N to test forking scenarios diff --git a/src/primitives/pureheader.h b/src/primitives/pureheader.h index 0e4385e6e..25f1ce98b 100644 --- a/src/primitives/pureheader.h +++ b/src/primitives/pureheader.h @@ -114,6 +114,12 @@ public: || (nVersion == 2 && GetChainId() == 0); } + CBlockVersion& operator=(const CBlockVersion& other) + { + nVersion = other.nVersion; + return *this; + } + CBlockVersion& operator=(const int nBaseVersion) { nVersion = (nBaseVersion & 0x000000ff) | (nVersion & 0xffffff00); diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp index e0ba823de..ab878c105 100644 --- a/src/rpcmining.cpp +++ b/src/rpcmining.cpp @@ -767,11 +767,11 @@ Value getauxblock(const Array& params, bool fHelp) if (vNodes.empty() && !Params().MineBlocksOnDemand()) throw JSONRPCError(RPC_CLIENT_NOT_CONNECTED, - "Namecoin is not connected!"); + "Dogecoin is not connected!"); if (IsInitialBlockDownload() && !Params().MineBlocksOnDemand()) throw JSONRPCError(RPC_CLIENT_IN_INITIAL_DOWNLOAD, - "Namecoin is downloading blocks..."); + "Dogecoin is downloading blocks..."); /* The variables below are used to keep track of created and not yet submitted auxpow blocks. Lock them, just in case. In principle |