diff --git a/src/hush.h b/src/hush.h index 14e8fd2f7..5ffdb5a71 100644 --- a/src/hush.h +++ b/src/hush.h @@ -818,7 +818,7 @@ int32_t hush_connectblock(bool fJustCheck, CBlockIndex *pindex,CBlock& block) return(0); } memset(&zero,0,sizeof(zero)); - komodo_init(pindex->GetHeight()); + hush_init(pindex->GetHeight()); HUSH_INITDONE = (uint32_t)time(NULL); if ( (sp= hush_stateptr(symbol,dest)) == 0 ) { diff --git a/src/hush_bitcoind.h b/src/hush_bitcoind.h index 4b6af7e53..5690b7968 100644 --- a/src/hush_bitcoind.h +++ b/src/hush_bitcoind.h @@ -699,7 +699,7 @@ void komodo_disconnect(CBlockIndex *pindex,CBlock& block) { char symbol[HUSH_SMART_CHAIN_MAXLEN],dest[HUSH_SMART_CHAIN_MAXLEN]; struct hush_state *sp; //fprintf(stderr,"disconnect ht.%d\n",pindex->GetHeight()); - komodo_init(pindex->GetHeight()); + hush_init(pindex->GetHeight()); if ( (sp= hush_stateptr(symbol,dest)) != 0 ) { //sp->rewinding = pindex->GetHeight(); @@ -754,7 +754,7 @@ int32_t hush_block2height(CBlock *block) } //printf(" <- coinbase.%d ht.%d\n",(int32_t)block->vtx[0].vin[0].scriptSig.size(),height); } - //komodo_init(height); + //hush_init(height); } if ( height != height2 ) { diff --git a/src/hush_globals.h b/src/hush_globals.h index 7bd1222b8..97415bd50 100644 --- a/src/hush_globals.h +++ b/src/hush_globals.h @@ -20,11 +20,11 @@ void hush_prefetch(FILE *fp); uint32_t hush_heightstamp(int32_t height); void hush_stateupdate(int32_t height,uint8_t notarypubs[][33],uint8_t numnotaries,uint8_t notaryid,uint256 txhash,uint64_t voutmask,uint8_t numvouts,uint32_t *pvals,uint8_t numpvals,int32_t kheight,uint32_t ktime,uint64_t opretvalue,uint8_t *opretbuf,uint16_t opretlen,uint16_t vout,uint256 MoM,int32_t MoMdepth); -void komodo_init(int32_t height); +void hush_init(int32_t height); int32_t hush_MoMdata(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 komodo_notarizeddata(int32_t nHeight,uint256 *notarized_hashp,uint256 *notarized_desttxidp); char *komodo_issuemethod(char *userpass,char *method,char *params,uint16_t port); -void komodo_init(int32_t height); +void hush_init(int32_t height); int32_t hush_chosennotary(int32_t *notaryidp,int32_t height,uint8_t *pubkey33,uint32_t timestamp); int32_t komodo_isrealtime(int32_t *kmdheightp); uint64_t komodo_paxtotal(); diff --git a/src/hush_notary.h b/src/hush_notary.h index 53a4c0a33..b94959766 100644 --- a/src/hush_notary.h +++ b/src/hush_notary.h @@ -216,7 +216,7 @@ int32_t hush_chosennotary(int32_t *notaryidp,int32_t height,uint8_t *pubkey33,ui if ( height >= 250000 ) return(-1); if ( Pubkeys == 0 ) - komodo_init(0); + hush_init(0); htind = height / KOMODO_ELECTION_GAP; if ( htind >= HUSH_MAXBLOCKS / KOMODO_ELECTION_GAP ) htind = (HUSH_MAXBLOCKS / KOMODO_ELECTION_GAP) - 1; @@ -434,11 +434,11 @@ void komodo_notarized_update(struct hush_state *sp,int32_t nHeight,int32_t notar portable_mutex_unlock(&komodo_mutex); } -void komodo_init(int32_t height) +void hush_init(int32_t height) { static int didinit; uint256 zero; int32_t k,n; uint8_t pubkeys[64][33]; if ( 0 && height != 0 ) - printf("komodo_init ht.%d didinit.%d\n",height,didinit); + printf("hush_init ht.%d didinit.%d\n",height,didinit); memset(&zero,0,sizeof(zero)); if ( didinit == 0 ) { diff --git a/src/init.cpp b/src/init.cpp index 01916ee76..163df8a39 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -94,7 +94,7 @@ extern bool hush_dailysnapshot(int32_t height); extern int32_t HUSH_LOADINGBLOCKS; extern char SMART_CHAIN_SYMBOL[]; extern int32_t HUSH_SNAPSHOT_INTERVAL; -extern void komodo_init(int32_t height); +extern void hush_init(int32_t height); #ifdef ENABLE_WALLET CWallet* pwalletMain = NULL; @@ -1840,7 +1840,7 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) // (we're likely using a testnet datadir, or the other way around). if (!mapBlockIndex.empty() && mapBlockIndex.count(chainparams.GetConsensus().hashGenesisBlock) == 0) return InitError(_("Incorrect or no genesis block found. Wrong datadir for network?")); - komodo_init(1); + hush_init(1); // Initialize the block index (no-op if non-empty database was already loaded) if (!InitBlockIndex()) { strLoadError = _("Error initializing block database");