From 8f9e2b542776a32aee07219f54a5aafc7bdbd08b Mon Sep 17 00:00:00 2001 From: nzsquirrell Date: Tue, 25 Aug 2015 20:21:41 +1200 Subject: [PATCH] minor auxpow fixes --- src/main.cpp | 9 ++++++++- src/rpcmining.cpp | 8 ++++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 04ddb315..06a3160b 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1551,7 +1551,14 @@ bool CBlockHeader::CheckProofOfWork(int nHeight) const { if (auxpow.get() != NULL) { - return error("CheckProofOfWork() : AUX POW is not allowed at this block"); + if((algo == ALGO_SHA256D) || (algo == ALGO_SCRYPT)) + { + return error("CheckProofOfWork() : AUX POW is not allowed at this block"); + } + else + { + return error("CheckProofOfWork() : AUX POW is not allowed for this algo"); + } } // Check if proof of work marches claimed amount diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp index 12e4bf7d..dd70e148 100644 --- a/src/rpcmining.cpp +++ b/src/rpcmining.cpp @@ -660,10 +660,10 @@ Value getworkaux(const Array& params, bool fHelp) ); if (vNodes.empty()) - throw JSONRPCError(RPC_CLIENT_NOT_CONNECTED, "Unitus is not connected!"); + throw JSONRPCError(RPC_CLIENT_NOT_CONNECTED, "Myriadcoin is not connected!"); if (IsInitialBlockDownload()) - throw JSONRPCError(RPC_CLIENT_IN_INITIAL_DOWNLOAD, "Unitus is downloading blocks..."); + throw JSONRPCError(RPC_CLIENT_IN_INITIAL_DOWNLOAD, "Myriadcoin is downloading blocks..."); // We use height plus one because we're testing the next block if ((chainActive.Tip()->nHeight+1) < GetAuxPowStartBlock()) { @@ -826,10 +826,10 @@ Value getauxblock(const Array& params, bool fHelp) "the aux proof of work and returns true if it was successful."); if (vNodes.empty()) - throw JSONRPCError(RPC_CLIENT_NOT_CONNECTED, "Unitus is not connected!"); + throw JSONRPCError(RPC_CLIENT_NOT_CONNECTED, "Myriadcoin is not connected!"); if (IsInitialBlockDownload()) - throw JSONRPCError(RPC_CLIENT_IN_INITIAL_DOWNLOAD, "Unitus is downloading blocks..."); + throw JSONRPCError(RPC_CLIENT_IN_INITIAL_DOWNLOAD, "Myriadcoin is downloading blocks..."); // We use height plus one because we're testing the next block if ((chainActive.Tip()->nHeight+1) < GetAuxPowStartBlock()) {