From 2c88bb70b6237ba884ca36ed5bec815d3b669d13 Mon Sep 17 00:00:00 2001 From: blackjok3r Date: Sun, 3 Feb 2019 16:05:37 +0800 Subject: [PATCH] disable temp file on initial block sync, extend era2 by 1 hour. --- src/main.cpp | 4 ++++ src/notaries_staked.h | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index 656cc0a96..b904e10e2 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -4736,6 +4736,7 @@ bool FindBlockPos(int32_t tmpflag,CValidationState &state, CDiskBlockPos &pos, u if ( 0 && tmpflag != 0 ) fprintf(stderr,"pos.nFile %d nPos %u\n",pos.nFile,pos.nPos); } + //sleep(30); } //fprintf(stderr, "nFile = %i size.%li maxTempFileSize0.%u maxTempFileSize1.%u\n",nFile,tmpBlockFiles.size(),maxTempFileSize0,maxTempFileSize1); sleep(30); *lastfilep = nFile; @@ -5338,6 +5339,8 @@ bool AcceptBlock(int32_t *futureblockp,CBlock& block, CValidationState& state, C int nHeight = pindex->GetHeight(); int32_t usetmp = 1; + if ( IsInitialBlockDownload() ) + usetmp = 0; // Write block to history file try { @@ -5586,6 +5589,7 @@ bool PruneOneBlockFile(bool tempfile, const int fileNumber) // Block is in main chain so we cant clear this file! return(false); } + fprintf(stderr, "pindex height.%i notarized height.%i \n", pindex->GetHeight(), notarized_height); if ( pindex->GetHeight() > notarized_height ) // Need to check this, does an invalid block have a height? { // This blocks height is not older than last notarization so it can be reorged into the main chain. diff --git a/src/notaries_staked.h b/src/notaries_staked.h index 2941fd9ac..468b7b7ca 100644 --- a/src/notaries_staked.h +++ b/src/notaries_staked.h @@ -23,7 +23,7 @@ static const char *iguanaSeeds[8][1] = static const int STAKED_ERA_GAP = 777; static const int NUM_STAKED_ERAS = 4; -static const int STAKED_NOTARIES_TIMESTAMP[NUM_STAKED_ERAS] = {1542964044, 1549184400, 1604233333, 1604244444}; +static const int STAKED_NOTARIES_TIMESTAMP[NUM_STAKED_ERAS] = {1542964044, 1549188000, 1604233333, 1604244444}; // Era array of pubkeys. static const char *notaries_STAKED[NUM_STAKED_ERAS][64][2] =