Test
This commit is contained in:
@@ -225,7 +225,7 @@ int32_t komodo_rwccdata(char *thischain,int32_t rwflag,struct komodo_ccdata *ccd
|
|||||||
if ( nonz == 0 )
|
if ( nonz == 0 )
|
||||||
return(0);
|
return(0);
|
||||||
memcpy(&hash,&tmp,sizeof(hash));
|
memcpy(&hash,&tmp,sizeof(hash));
|
||||||
fprintf(stderr,"[%s] ccdata.%s id.%d notarized_ht.%d MoM.%s height.%d/t%d\n",ASSETCHAINS_SYMBOL,ccdata->symbol,ccdata->CCid,ccdata->MoMdata.notarized_height,hash.ToString().c_str(),ccdata->MoMdata.height,ccdata->MoMdata.txi);
|
//fprintf(stderr,"[%s] ccdata.%s id.%d notarized_ht.%d MoM.%s height.%d/t%d\n",ASSETCHAINS_SYMBOL,ccdata->symbol,ccdata->CCid,ccdata->MoMdata.notarized_height,hash.ToString().c_str(),ccdata->MoMdata.height,ccdata->MoMdata.txi);
|
||||||
if ( ASSETCHAINS_SYMBOL[0] == 0 )
|
if ( ASSETCHAINS_SYMBOL[0] == 0 )
|
||||||
{
|
{
|
||||||
if ( CC_data != 0 && (CC_data->MoMdata.height > ccdata->MoMdata.height || (CC_data->MoMdata.height == ccdata->MoMdata.height && CC_data->MoMdata.txi >= ccdata->MoMdata.txi)) )
|
if ( CC_data != 0 && (CC_data->MoMdata.height > ccdata->MoMdata.height || (CC_data->MoMdata.height == ccdata->MoMdata.height && CC_data->MoMdata.txi >= ccdata->MoMdata.txi)) )
|
||||||
|
|||||||
12
src/main.cpp
12
src/main.cpp
@@ -4181,7 +4181,7 @@ bool TestBlockValidity(CValidationState &state, const CBlock& block, CBlockIndex
|
|||||||
}
|
}
|
||||||
if (!ContextualCheckBlock(block, state, pindexPrev))
|
if (!ContextualCheckBlock(block, state, pindexPrev))
|
||||||
{
|
{
|
||||||
fprintf(stderr,"TestBlockValidity failure C\n");
|
//fprintf(stderr,"TestBlockValidity failure C\n");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!ConnectBlock(block, state, &indexDummy, viewNew, true,fCheckPOW))
|
if (!ConnectBlock(block, state, &indexDummy, viewNew, true,fCheckPOW))
|
||||||
@@ -4313,7 +4313,7 @@ bool CheckDiskSpace(uint64_t nAdditionalBytes)
|
|||||||
|
|
||||||
FILE* OpenDiskFile(const CDiskBlockPos &pos, const char *prefix, bool fReadOnly)
|
FILE* OpenDiskFile(const CDiskBlockPos &pos, const char *prefix, bool fReadOnly)
|
||||||
{
|
{
|
||||||
static int32_t didinit[1000]; long fsize,fpos; int32_t incr = 16*1024*1024;
|
static int32_t didinit[64]; long fsize,fpos; int32_t incr = 16*1024*1024;
|
||||||
if (pos.IsNull())
|
if (pos.IsNull())
|
||||||
return NULL;
|
return NULL;
|
||||||
boost::filesystem::path path = GetBlockPosFilename(pos, prefix);
|
boost::filesystem::path path = GetBlockPosFilename(pos, prefix);
|
||||||
@@ -4336,10 +4336,10 @@ FILE* OpenDiskFile(const CDiskBlockPos &pos, const char *prefix, bool fReadOnly)
|
|||||||
if ( ignore != 0 )
|
if ( ignore != 0 )
|
||||||
{
|
{
|
||||||
rewind(file);
|
rewind(file);
|
||||||
while ( fread(ignore,1,incr,file) == incr )
|
while ( fread(ignore,1,incr,file) == incr ) // prefetch
|
||||||
fprintf(stderr,".");
|
fprintf(stderr,".");
|
||||||
free(ignore);
|
free(ignore);
|
||||||
fprintf(stderr,"blk.%d loaded %ld bytes set fpos.%ld loading.%d\n",(int)pos.nFile,(long)ftell(file),(long)fpos,KOMODO_LOADINGBLOCKS);
|
// fprintf(stderr,"blk.%d loaded %ld bytes set fpos.%ld loading.%d\n",(int)pos.nFile,(long)ftell(file),(long)fpos,KOMODO_LOADINGBLOCKS);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
fseek(file,fpos,SEEK_SET);
|
fseek(file,fpos,SEEK_SET);
|
||||||
@@ -4583,6 +4583,7 @@ bool CVerifyDB::VerifyDB(CCoinsView *coinsview, int nCheckLevel, int nCheckDepth
|
|||||||
CValidationState state;
|
CValidationState state;
|
||||||
// No need to verify JoinSplits twice
|
// No need to verify JoinSplits twice
|
||||||
auto verifier = libzcash::ProofVerifier::Disabled();
|
auto verifier = libzcash::ProofVerifier::Disabled();
|
||||||
|
fprintf(stderr,"start VerifyDB %u\n",(uint32_t)time(NULL));
|
||||||
for (CBlockIndex* pindex = chainActive.Tip(); pindex && pindex->pprev; pindex = pindex->pprev)
|
for (CBlockIndex* pindex = chainActive.Tip(); pindex && pindex->pprev; pindex = pindex->pprev)
|
||||||
{
|
{
|
||||||
boost::this_thread::interruption_point();
|
boost::this_thread::interruption_point();
|
||||||
@@ -4620,6 +4621,7 @@ bool CVerifyDB::VerifyDB(CCoinsView *coinsview, int nCheckLevel, int nCheckDepth
|
|||||||
if (ShutdownRequested())
|
if (ShutdownRequested())
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
fprintf(stderr,"end VerifyDB %u\n",(uint32_t)time(NULL));
|
||||||
if (pindexFailure)
|
if (pindexFailure)
|
||||||
return error("VerifyDB(): *** coin database inconsistencies found (last %i blocks, %i good transactions before that)\n", chainActive.Height() - pindexFailure->nHeight + 1, nGoodTransactions);
|
return error("VerifyDB(): *** coin database inconsistencies found (last %i blocks, %i good transactions before that)\n", chainActive.Height() - pindexFailure->nHeight + 1, nGoodTransactions);
|
||||||
|
|
||||||
@@ -4891,7 +4893,7 @@ bool LoadExternalBlockFile(FILE* fileIn, CDiskBlockPos *dbp)
|
|||||||
try {
|
try {
|
||||||
// This takes over fileIn and calls fclose() on it in the CBufferedFile destructor
|
// This takes over fileIn and calls fclose() on it in the CBufferedFile destructor
|
||||||
//CBufferedFile blkdat(fileIn, 2*MAX_BLOCK_SIZE, MAX_BLOCK_SIZE+8, SER_DISK, CLIENT_VERSION);
|
//CBufferedFile blkdat(fileIn, 2*MAX_BLOCK_SIZE, MAX_BLOCK_SIZE+8, SER_DISK, CLIENT_VERSION);
|
||||||
CBufferedFile blkdat(fileIn, 256*MAX_BLOCK_SIZE, MAX_BLOCK_SIZE+8, SER_DISK, CLIENT_VERSION);
|
CBufferedFile blkdat(fileIn, 32*MAX_BLOCK_SIZE, MAX_BLOCK_SIZE+8, SER_DISK, CLIENT_VERSION);
|
||||||
uint64_t nRewind = blkdat.GetPos();
|
uint64_t nRewind = blkdat.GetPos();
|
||||||
while (!blkdat.eof()) {
|
while (!blkdat.eof()) {
|
||||||
boost::this_thread::interruption_point();
|
boost::this_thread::interruption_point();
|
||||||
|
|||||||
Reference in New Issue
Block a user