mirror of
https://github.com/jwinterm/myriadcoin.git
synced 2026-10-22 06:28:44 +02:00
minor auxpow fixes
This commit is contained in:
+8
-1
@@ -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
|
||||
|
||||
+4
-4
@@ -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()) {
|
||||
|
||||
Reference in New Issue
Block a user