mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-08 10:31:50 -05:00
Update parameters in headerssync.cpp
This commit is contained in:
parent
7899402cff
commit
53d7d35b58
1 changed files with 5 additions and 5 deletions
|
@ -9,15 +9,15 @@
|
|||
#include <util/check.h>
|
||||
#include <util/vector.h>
|
||||
|
||||
// The two constants below are computed using the simulation script on
|
||||
// https://gist.github.com/sipa/016ae445c132cdf65a2791534dfb7ae1
|
||||
// The two constants below are computed using the simulation script in
|
||||
// contrib/devtools/headerssync-params.py.
|
||||
|
||||
//! Store a commitment to a header every HEADER_COMMITMENT_PERIOD blocks.
|
||||
constexpr size_t HEADER_COMMITMENT_PERIOD{584};
|
||||
//! Store one header commitment per HEADER_COMMITMENT_PERIOD blocks.
|
||||
constexpr size_t HEADER_COMMITMENT_PERIOD{600};
|
||||
|
||||
//! Only feed headers to validation once this many headers on top have been
|
||||
//! received and validated against commitments.
|
||||
constexpr size_t REDOWNLOAD_BUFFER_SIZE{13959}; // 13959/584 = ~23.9 commitments
|
||||
constexpr size_t REDOWNLOAD_BUFFER_SIZE{14308}; // 14308/600 = ~23.8 commitments
|
||||
|
||||
// Our memory analysis assumes 48 bytes for a CompressedHeader (so we should
|
||||
// re-calculate parameters if we compress further)
|
||||
|
|
Loading…
Add table
Reference in a new issue