.
This commit is contained in:
@@ -847,7 +847,7 @@ uint32_t hush_heightstamp(int32_t height)
|
||||
}
|
||||
}*/
|
||||
|
||||
void komodo_index2pubkey33(uint8_t *pubkey33,CBlockIndex *pindex,int32_t height)
|
||||
void hush_index2pubkey33(uint8_t *pubkey33,CBlockIndex *pindex,int32_t height)
|
||||
{
|
||||
int32_t num,i; CBlock block;
|
||||
memset(pubkey33,0,33);
|
||||
@@ -869,7 +869,7 @@ void komodo_index2pubkey33(uint8_t *pubkey33,CBlockIndex *pindex,int32_t height)
|
||||
memcpy(destpubkey33,pindex->pubkey33,33);
|
||||
return(pindex->notaryid);
|
||||
}
|
||||
komodo_index2pubkey33(pubkey33,pindex,height);
|
||||
hush_index2pubkey33(pubkey33,pindex,height);
|
||||
if ( destpubkey33 != 0 )
|
||||
memcpy(destpubkey33,pindex->pubkey33,33);
|
||||
if ( pindex->didinit != 0 )
|
||||
|
||||
@@ -24,7 +24,7 @@ int32_t CC_firstheight;
|
||||
|
||||
uint256 BuildMerkleTree(bool* fMutated, const std::vector<uint256> leaves, std::vector<uint256> &vMerkleTree);
|
||||
|
||||
uint256 komodo_calcMoM(int32_t height,int32_t MoMdepth)
|
||||
uint256 hush_calcMoM(int32_t height,int32_t MoMdepth)
|
||||
{
|
||||
static uint256 zero; CBlockIndex *pindex; int32_t i; std::vector<uint256> tree, leaves;
|
||||
bool fMutated;
|
||||
|
||||
@@ -4996,7 +4996,7 @@ bool CheckBlockHeader(int32_t *futureblockp,int32_t height,CBlockIndex *pindex,
|
||||
return state.DoS(100, error("CheckBlockHeader(): Equihash solution invalid"),REJECT_INVALID, "invalid-solution");
|
||||
}
|
||||
// Check proof of work matches claimed amount
|
||||
/*komodo_index2pubkey33(pubkey33,pindex,height);
|
||||
/*hush_index2pubkey33(pubkey33,pindex,height);
|
||||
if ( fCheckPOW && !CheckProofOfWork(height,pubkey33,blockhdr.GetHash(), blockhdr.nBits, Params().GetConsensus(),blockhdr.nTime) )
|
||||
return state.DoS(50, error("CheckBlockHeader(): proof of work failed"),REJECT_INVALID, "high-hash");*/
|
||||
return true;
|
||||
|
||||
@@ -672,7 +672,7 @@ bool CheckEquihashSolution(const CBlockHeader *pblock, const CChainParams& param
|
||||
|
||||
int32_t hush_chosennotary(int32_t *notaryidp,int32_t height,uint8_t *pubkey33,uint32_t timestamp);
|
||||
int32_t hush_currentheight();
|
||||
void komodo_index2pubkey33(uint8_t *pubkey33,CBlockIndex *pindex,int32_t height);
|
||||
void hush_index2pubkey33(uint8_t *pubkey33,CBlockIndex *pindex,int32_t height);
|
||||
bool hush_checkopret(CBlock *pblock, CScript &merkleroot);
|
||||
CScript hush_makeopret(CBlock *pblock, bool fNew);
|
||||
extern int32_t HUSH_CHOSEN_ONE;
|
||||
|
||||
@@ -59,7 +59,7 @@ bool EnsureWalletIsAvailable(bool avoidException);
|
||||
int32_t hush_MoM(int32_t *notarized_htp,uint256 *MoMp,uint256 *kmdtxidp,int32_t nHeight,uint256 *MoMoMp,int32_t *MoMoMoffsetp,int32_t *MoMoMdepthp,int32_t *kmdstartip,int32_t *kmdendip);
|
||||
int32_t hush_MoMoMdata(char *hexstr,int32_t hexsize,struct hush_ccdataMoMoM *mdata,char *symbol,int32_t kmdheight,int32_t notarized_height);
|
||||
struct hush_ccdata_entry *komodo_allMoMs(int32_t *nump,uint256 *MoMoMp,int32_t kmdstarti,int32_t kmdendi);
|
||||
uint256 komodo_calcMoM(int32_t height,int32_t MoMdepth);
|
||||
uint256 hush_calcMoM(int32_t height,int32_t MoMdepth);
|
||||
int32_t hush_notaries(uint8_t pubkeys[64][33],int32_t height,uint32_t timestamp);
|
||||
extern std::string ASSETCHAINS_SELFIMPORT;
|
||||
|
||||
@@ -169,7 +169,7 @@ UniValue calc_MoM(const UniValue& params, bool fHelp, const CPubKey& mypk)
|
||||
if ( height <= 0 || MoMdepth <= 0 || MoMdepth >= height )
|
||||
throw runtime_error("calc_MoM illegal height or MoMdepth\n");
|
||||
//fprintf(stderr,"height_MoM height.%d\n",height);
|
||||
MoM = komodo_calcMoM(height,MoMdepth);
|
||||
MoM = hush_calcMoM(height,MoMdepth);
|
||||
ret.push_back(Pair("coin",(char *)(SMART_CHAIN_SYMBOL[0] == 0 ? "HUSH" : SMART_CHAIN_SYMBOL)));
|
||||
ret.push_back(Pair("height",height));
|
||||
ret.push_back(Pair("MoMdepth",MoMdepth));
|
||||
|
||||
@@ -872,7 +872,7 @@ std::string HelpExampleRpc(const std::string& methodname, const std::string& arg
|
||||
string experimentalDisabledHelpMsg(const string& rpc, const string& enableArg)
|
||||
{
|
||||
string daemon = "hushd";
|
||||
string ticker = SMART_CHAIN_SYMBOL[0] == 0 ? "komodo" : SMART_CHAIN_SYMBOL;
|
||||
string ticker = SMART_CHAIN_SYMBOL;
|
||||
|
||||
return "\nWARNING: " + rpc + " is disabled.\n"
|
||||
"To enable it, restart " + daemon + " with the -experimentalfeatures and\n"
|
||||
|
||||
@@ -647,7 +647,7 @@ bool CBlockTreeDB::ReadFlag(const std::string &name, bool &fValue) {
|
||||
return true;
|
||||
}
|
||||
|
||||
void komodo_index2pubkey33(uint8_t *pubkey33,CBlockIndex *pindex,int32_t height);
|
||||
void hush_index2pubkey33(uint8_t *pubkey33,CBlockIndex *pindex,int32_t height);
|
||||
|
||||
bool CBlockTreeDB::blockOnchainActive(const uint256 &hash) {
|
||||
BlockMap::const_iterator it = mapBlockIndex.find(hash);
|
||||
@@ -723,7 +723,7 @@ bool CBlockTreeDB::LoadBlockIndexGuts()
|
||||
if ( 0 ) // POW will be checked before any block is connected
|
||||
{
|
||||
uint8_t pubkey33[33];
|
||||
komodo_index2pubkey33(pubkey33,pindexNew,pindexNew->GetHeight());
|
||||
hush_index2pubkey33(pubkey33,pindexNew,pindexNew->GetHeight());
|
||||
if (!CheckProofOfWork(header,pubkey33,pindexNew->GetHeight(),Params().GetConsensus()))
|
||||
return error("LoadBlockIndex(): CheckProofOfWork failed: %s", pindexNew->ToString());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user