9

To be more exact: Given two blocks A and B, with heights A < B, but with positions in the blk file (we'll call them pA and pB) pA > pB.

What is the maximum amount of blocks that there could be stored in a blk*.dat file, between pB and pA?

For instance, let's say this is a blk*.dat file:

C D B E F G A H I

We can see here that block A is stored 3 blocks later than B, despite A having a lower height than B. Is there a maximum amount for this value (which in this case is 3)?

6

1024.

/** Size of the "block download window": how far ahead of our current height do we fetch?
 *  Larger windows tolerate larger download speed differences between peer, but increase the potential
 *  degree of disordering of blocks on disk (which make reindexing and in the future perhaps pruning
 *  harder). We'll probably want to make this a per-peer adaptive value at some point. */
static const unsigned int BLOCK_DOWNLOAD_WINDOW = 1024;

(Source.)

  • 4
    Warning: Before depending on this value, remember that this constant might change in future versions or may even have been changed in the source code by the user itself. – Jannes Nov 26 '15 at 23:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.