@@ -45,7 +45,7 @@ struct komodo_state KOMODO_STATES[34];
|
||||
int COINBASE_MATURITY = _COINBASE_MATURITY;//100;
|
||||
|
||||
int32_t IS_KOMODO_NOTARY,USE_EXTERNAL_PUBKEY,KOMODO_CHOSEN_ONE,ASSETCHAINS_SEED,KOMODO_ON_DEMAND,KOMODO_EXTERNAL_NOTARIES,KOMODO_PASSPORT_INITDONE,KOMODO_PAX,KOMODO_EXCHANGEWALLET,KOMODO_REWIND;
|
||||
int32_t KOMODO_LASTMINED,prevKOMODO_LASTMINED,JUMBLR_PAUSE,ASSETCHAINS_CC;
|
||||
int32_t KOMODO_LASTMINED,prevKOMODO_LASTMINED,JUMBLR_PAUSE=1,ASSETCHAINS_CC;
|
||||
std::string NOTARY_PUBKEY,ASSETCHAINS_NOTARIES,ASSETCHAINS_OVERRIDE_PUBKEY;
|
||||
uint8_t NOTARY_PUBKEY33[33],ASSETCHAINS_OVERRIDE_PUBKEY33[33];
|
||||
|
||||
|
||||
17
src/main.cpp
17
src/main.cpp
@@ -1615,14 +1615,17 @@ bool ReadBlockFromDisk(int32_t height,CBlock& block, const CDiskBlockPos& pos)
|
||||
return error("%s: Deserialize or I/O error - %s at %s", __func__, e.what(), pos.ToString());
|
||||
}
|
||||
// Check the header
|
||||
komodo_block2pubkey33(pubkey33,(CBlock *)&block);
|
||||
if (!(CheckEquihashSolution(&block, Params()) && CheckProofOfWork(height,pubkey33,block.GetHash(), block.nBits, Params().GetConsensus(),block.nTime)))
|
||||
if ( 0 )
|
||||
{
|
||||
int32_t i; for (i=0; i<33; i++)
|
||||
fprintf(stderr,"%02x",pubkey33[i]);
|
||||
fprintf(stderr," warning unexpected diff at ht.%d\n",height);
|
||||
|
||||
return error("ReadBlockFromDisk: Errors in block header at %s", pos.ToString());
|
||||
komodo_block2pubkey33(pubkey33,(CBlock *)&block);
|
||||
if (!(CheckEquihashSolution(&block, Params()) && CheckProofOfWork(height,pubkey33,block.GetHash(), block.nBits, Params().GetConsensus(),block.nTime)))
|
||||
{
|
||||
int32_t i; for (i=0; i<33; i++)
|
||||
fprintf(stderr,"%02x",pubkey33[i]);
|
||||
fprintf(stderr," warning unexpected diff at ht.%d\n",height);
|
||||
|
||||
return error("ReadBlockFromDisk: Errors in block header at %s", pos.ToString());
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -203,7 +203,10 @@ UniValue jumblr_deposit(const UniValue& params, bool fHelp)
|
||||
{
|
||||
string addr = params[0].get_str();
|
||||
if ( (retval= Jumblr_depositaddradd((char *)addr.c_str())) >= 0 )
|
||||
{
|
||||
result.push_back(Pair("result", retval));
|
||||
JUMBLR_PAUSE = 0;
|
||||
}
|
||||
else result.push_back(Pair("error", retval));
|
||||
} else result.push_back(Pair("error", "invalid address"));
|
||||
return(result);
|
||||
@@ -222,6 +225,7 @@ UniValue jumblr_secret(const UniValue& params, bool fHelp)
|
||||
retval = Jumblr_secretaddradd((char *)addr.c_str());
|
||||
result.push_back(Pair("result", "success"));
|
||||
result.push_back(Pair("num", retval));
|
||||
JUMBLR_PAUSE = 0;
|
||||
} else result.push_back(Pair("error", "invalid address"));
|
||||
return(result);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user