Skip to content

Commit

Permalink
comment
Browse files Browse the repository at this point in the history
  • Loading branch information
decryp2kanon committed May 13, 2020
1 parent 7590bb6 commit a7b1cca
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/validation.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,17 @@ static const unsigned int UNDOFILE_CHUNK_SIZE = 0x100000; // 1 MiB
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. */
// IBD: make it same as MAX_HEADERS_RESULTS to match buffersize
static const int MAX_BLOCKS_IN_TRANSIT_PER_PEER = 2000; // (was 16) // FIXME.SUGAR
// FIXME.SUGAR
// GetPoWHash_cached
/** IBD: which sets MAX_BLOCKS_IN_TRANSIT_PER_PEER to be same as MAX_HEADERS_RESULTS.
* Without this change, at least in Resistance the block headers download would get unnecessarily
* far ahead of the full blocks download, resulting in more work lost and redone in case the
* initial blocks download is interrupted and continued.
* The work loss is because we do not yet store cached PoWs on disk. */
static const int MAX_BLOCKS_IN_TRANSIT_PER_PEER = 2000; // (was 16)

/** 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
Expand Down

0 comments on commit a7b1cca

Please sign in to comment.