aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMax K. <[email protected]>2015-07-29 19:19:27 +0200
committerMax K. <[email protected]>2015-07-29 19:19:27 +0200
commitac34ac987a8ba910952c9cc33877b7aeb3cebdf1 (patch)
tree8087d25c9852afdedf19f3f48ae06d48a6916ce4 /src
parentMerge pull request #1205 from rnicoll/1.10-genesis-checks (diff)
parentMinor AuxPoW fixes (diff)
downloaddiscoin-ac34ac987a8ba910952c9cc33877b7aeb3cebdf1.tar.xz
discoin-ac34ac987a8ba910952c9cc33877b7aeb3cebdf1.zip
Merge pull request #1210 from rnicoll/1.10-auxpow-fixes
Minor AuxPoW fixes
Diffstat (limited to 'src')
-rw-r--r--src/miner.cpp1
-rw-r--r--src/primitives/pureheader.h6
-rw-r--r--src/rpcmining.cpp4
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