Skip to content

Commit e9b84be

Browse files
authored
Merge pull request #268 from jl777/dev
Dev
2 parents fc20b90 + 1dcfdab commit e9b84be

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

src/komodo_gateway.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ int32_t komodo_paxcmp(char *symbol,int32_t kmdheight,uint64_t value,uint64_t che
269269
return(0);
270270
else
271271
{
272-
if ( kmdheight >= 86150 )
272+
if ( kmdheight >= 238000 )
273273
printf("ht.%d ignore mismatched %s value %lld vs checkvalue %lld -> ratio.%d\n",kmdheight,symbol,(long long)value,(long long)checkvalue,ratio);
274274
return(-1);
275275
}
@@ -878,7 +878,7 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3
878878
}
879879
}
880880
}
881-
else if ( kmdheight > 182000 && (kmdheight > 214700 || strcmp(base,ASSETCHAINS_SYMBOL) == 0) ) //seed != 0 &&
881+
else if ( kmdheight > 238000 && (kmdheight > 214700 || strcmp(base,ASSETCHAINS_SYMBOL) == 0) ) //seed != 0 &&
882882
printf("pax %s deposit %.8f rejected kmdheight.%d %.8f KMD check %.8f seed.%llu\n",base,dstr(fiatoshis),kmdheight,dstr(value),dstr(checktoshis),(long long)seed);
883883
} //else printf("paxdeposit height.%d vs kmdheight.%d\n",height,kmdheight);
884884
}

src/main.cpp

+11-7
Original file line numberDiff line numberDiff line change
@@ -1528,12 +1528,12 @@ bool IsInitialBlockDownload()
15281528
LOCK(cs_main);
15291529
if (fImporting || fReindex)
15301530
{
1531-
//fprintf(stderr,"fImporting %d || %d fReindex\n",(int32_t)fImporting,(int32_t)fReindex);
1531+
//fprintf(stderr,"IsInitialBlockDownload: fImporting %d || %d fReindex\n",(int32_t)fImporting,(int32_t)fReindex);
15321532
return true;
15331533
}
15341534
if (fCheckpointsEnabled && chainActive.Height() < Checkpoints::GetTotalBlocksEstimate(chainParams.Checkpoints()))
15351535
{
1536-
//fprintf(stderr,"checkpoint -> initialdownload\n");
1536+
//fprintf(stderr,"IsInitialBlockDownload: checkpoint -> initialdownload\n");
15371537
return true;
15381538
}
15391539
static bool lockIBDState = false;
@@ -1542,14 +1542,18 @@ bool IsInitialBlockDownload()
15421542
//fprintf(stderr,"lockIBDState true %d < %d\n",chainActive.Height(),pindexBestHeader->nHeight - 10);
15431543
return false;
15441544
}
1545-
bool state;
1545+
bool state; CBlockIndex *ptr = chainActive.Tip();
1546+
if ( ptr == 0 )
1547+
ptr = pindexBestHeader;
1548+
else if ( pindexBestHeader != 0 && pindexBestHeader->nHeight > ptr->nHeight )
1549+
ptr = pindexBestHeader;
15461550
if ( ASSETCHAINS_SYMBOL[0] == 0 )
1547-
state = (chainActive.Height() > 236000 && chainActive.Height() < pindexBestHeader->nHeight - 24*6) ||
1548-
pindexBestHeader->GetBlockTime() < (GetTime() - chainParams.MaxTipAge());
1549-
else state = (chainActive.Height() < pindexBestHeader->nHeight - 100);
1551+
state = (chainActive.Height() < ptr->nHeight - 24*6) ||
1552+
ptr->GetBlockTime() < (GetTime() - chainParams.MaxTipAge());
1553+
else state = (chainActive.Height() < ptr->nHeight - 100);
1554+
fprintf(stderr,"state.%d ht.%d vs %d, t.%u %u\n",state,(int32_t)chainActive.Height(),(uint32_t)ptr->nHeight,(int32_t)ptr->GetBlockTime(),(uint32_t)(GetTime() - chainParams.MaxTipAge()));
15501555
if (!state)
15511556
{
1552-
//fprintf(stderr,"lockIBDState tru\n");
15531557
lockIBDState = true;
15541558
}
15551559
return state;

0 commit comments

Comments
 (0)