Commit f624a34e authored by coin-server's avatar coin-server

Merge branch 'syncspeedup' into 'master'

massively improve sync speed

See merge request ProjectMerge/merge!42
parents 77d9d3b7 da70f8be
......@@ -2789,7 +2789,7 @@ bool ActivateBestChain(CValidationState& state, CBlock* pblock, bool fAlreadyChe
uiInterface.NotifyBlockTip(hashNewTip);
}
} while (pindexMostWork != chainActive.Tip());
CheckBlockIndex();
// CheckBlockIndex();
// Write changes periodically to disk, after relay.
if (!FlushStateToDisk(state, FLUSH_STATE_PERIODIC)) {
......@@ -3600,7 +3600,7 @@ bool ProcessNewBlock(CValidationState& state, CNode* pfrom, CBlock* pblock, CDis
if (pindex && pfrom) {
mapBlockSource[pindex->GetBlockHash ()] = pfrom->GetId ();
}
CheckBlockIndex ();
// CheckBlockIndex ();
if (!ret)
return error ("%s : AcceptBlock FAILED", __func__);
}
......
......@@ -88,7 +88,7 @@ static const int MAX_SCRIPTCHECK_THREADS = 16;
/** -par default (number of script-checking threads, 0 = auto) */
static const int DEFAULT_SCRIPTCHECK_THREADS = 0;
/** Number of blocks that can be requested at any given time from a single peer. */
static const int MAX_BLOCKS_IN_TRANSIT_PER_PEER = 128;
static const int MAX_BLOCKS_IN_TRANSIT_PER_PEER = 256;
/** Timeout in seconds during which a peer must stall block download progress before being disconnected. */
static const unsigned int BLOCK_STALLING_TIMEOUT = 2;
/** Number of headers sent in one getheaders result. We rely on the assumption that if a peer sends
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment