diff --git a/src/bitcoind.cpp b/src/bitcoind.cpp index 6180cd12b..f32b559bd 100644 --- a/src/bitcoind.cpp +++ b/src/bitcoind.cpp @@ -76,14 +76,14 @@ void WaitForShutdown(boost::thread_group* threadGroup) fprintf(stderr,"error: earlytx must be before block height %d or tx does not exist\n",KOMODO_EARLYTXID_HEIGHT); StartShutdown(); } - if ( ASSETCHAINS_STAKED == 0 && ASSETCHAINS_ADAPTIVEPOW == 0 && (pindex= komodo_chainactive(1)) != 0 ) + /*if ( ASSETCHAINS_STAKED == 0 && ASSETCHAINS_ADAPTIVEPOW == 0 && (pindex= komodo_chainactive(1)) != 0 ) { if ( pindex->nTime > ADAPTIVEPOW_CHANGETO_DEFAULTON ) { ASSETCHAINS_ADAPTIVEPOW = 1; fprintf(stderr,"default activate adaptivepow\n"); } else fprintf(stderr,"height1 time %u vs %u\n",pindex->nTime,ADAPTIVEPOW_CHANGETO_DEFAULTON); - } //else fprintf(stderr,"cant find height 1\n"); + } //else fprintf(stderr,"cant find height 1\n");*/ if ( ASSETCHAINS_CBOPRET != 0 ) komodo_pricesinit(); while (!fShutdown) diff --git a/src/cryptoconditions/src/cryptoconditions.c b/src/cryptoconditions/src/cryptoconditions.c index 12f973b97..74949affc 100644 --- a/src/cryptoconditions/src/cryptoconditions.c +++ b/src/cryptoconditions/src/cryptoconditions.c @@ -272,10 +272,10 @@ int cc_verify(const struct CC *cond, const unsigned char *msg, size_t msgLength, unsigned char msgHash[32]; if (doHashMsg) sha256(msg, msgLength, msgHash); else memcpy(msgHash, msg, 32); - int32_t z; - for (z=0; z<32; z++) - fprintf(stderr,"%02x",msgHash[z]); - fprintf(stderr," msgHash msglen.%d\n",msgLength); + //int32_t z; + //for (z=0; z<32; z++) + // fprintf(stderr,"%02x",msgHash[z]); + //fprintf(stderr," msgHash msglen.%d\n",(int32_t)msgLength); if (!cc_secp256k1VerifyTreeMsg32(cond, msgHash)) { fprintf(stderr," cc_verify error C\n"); diff --git a/src/komodo_defs.h b/src/komodo_defs.h index db4702920..9bebea215 100644 --- a/src/komodo_defs.h +++ b/src/komodo_defs.h @@ -20,7 +20,7 @@ #include "komodo_nk.h" #define KOMODO_EARLYTXID_HEIGHT 100 -#define ADAPTIVEPOW_CHANGETO_DEFAULTON 1572480000 +//#define ADAPTIVEPOW_CHANGETO_DEFAULTON 1572480000 #define ASSETCHAINS_MINHEIGHT 128 #define ASSETCHAINS_MAX_ERAS 7 #define KOMODO_ELECTION_GAP 2000 diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index b067a0b5e..b2ffc26f0 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -1420,7 +1420,7 @@ void komodo_passport_iteration() int32_t maxseconds = 10; FILE *fp; uint8_t *filedata; long fpos,datalen,lastfpos; int32_t baseid,limit,n,ht,isrealtime,expired,refid,blocks,longest; struct komodo_state *sp,*refsp; char *retstr,fname[512],*base,symbol[KOMODO_ASSETCHAIN_MAXLEN],dest[KOMODO_ASSETCHAIN_MAXLEN]; uint32_t buf[3],starttime; uint64_t RTmask = 0; //CBlockIndex *pindex; expired = 0; - while ( KOMODO_INITDONE == 0 ) + while ( 0 && KOMODO_INITDONE == 0 ) { fprintf(stderr,"[%s] PASSPORT iteration waiting for KOMODO_INITDONE\n",ASSETCHAINS_SYMBOL); sleep(3); diff --git a/src/komodo_nSPV_fullnode.h b/src/komodo_nSPV_fullnode.h index 3856caf12..78c3939cd 100644 --- a/src/komodo_nSPV_fullnode.h +++ b/src/komodo_nSPV_fullnode.h @@ -620,7 +620,7 @@ void komodo_nSPVreq(CNode *pfrom,std::vector request) // received a req iguana_rwnum(0,&request[len-8],sizeof(skipcount),&skipcount); iguana_rwnum(0,&request[len-4],sizeof(filter),&filter); } - if ( isCC != 0 ) + if ( 0 && isCC != 0 ) fprintf(stderr,"utxos %s isCC.%d skipcount.%d filter.%x\n",coinaddr,isCC,skipcount,filter); memset(&U,0,sizeof(U)); if ( (slen= NSPV_getaddressutxos(&U,coinaddr,isCC,skipcount,filter)) > 0 ) @@ -660,7 +660,7 @@ void komodo_nSPVreq(CNode *pfrom,std::vector request) // received a req iguana_rwnum(0,&request[len-8],sizeof(skipcount),&skipcount); iguana_rwnum(0,&request[len-4],sizeof(filter),&filter); } - //if ( isCC != 0 ) + if ( 0 && isCC != 0 ) fprintf(stderr,"txids %s isCC.%d skipcount.%d filter.%d\n",coinaddr,isCC,skipcount,filter); memset(&T,0,sizeof(T)); if ( (slen= NSPV_getaddresstxids(&T,coinaddr,isCC,skipcount,filter)) > 0 ) diff --git a/src/main.cpp b/src/main.cpp index 07fdd0ef0..da8b706ea 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -4452,8 +4452,8 @@ static bool ActivateBestChainStep(bool fSkipdpow, CValidationState &state, CBloc notarizedht = komodo_notarized_height(&prevMoMheight,¬arizedhash,&txid); if ( !fSkipdpow && pindexFork != 0 && pindexOldTip->GetHeight() > notarizedht && pindexFork->GetHeight() < notarizedht ) { - fprintf(stderr,"pindexOldTip->GetHeight().%d > notarizedht %d && pindexFork->GetHeight().%d is < notarizedht %d, so ignore it\n",(int32_t)pindexFork->GetHeight(),notarizedht,(int32_t)pindexOldTip->GetHeight(),notarizedht); - return state.DoS(100, error("ActivateBestChainStep(): pindexOldTip->GetHeight().%d > notarizedht %d && pindexFork->GetHeight().%d is < notarizedht %d, so ignore it",(int32_t)pindexFork->GetHeight(),notarizedht,(int32_t)pindexOldTip->GetHeight(),notarizedht), + fprintf(stderr,"pindexOldTip->GetHeight().%d > notarizedht %d && pindexFork->GetHeight().%d is < notarizedht %d, so ignore it\n",(int32_t)pindexOldTip->GetHeight(),notarizedht,(int32_t)pindexFork->GetHeight(),notarizedht); + return state.DoS(100, error("ActivateBestChainStep(): pindexOldTip->GetHeight().%d > notarizedht %d && pindexFork->GetHeight().%d is < notarizedht %d, so ignore it",(int32_t)pindexOldTip->GetHeight(),notarizedht,(int32_t)pindexFork->GetHeight(),notarizedht), REJECT_INVALID, "past-notarized-height"); } // - On ChainDB initialization, pindexOldTip will be null, so there are no removable blocks.