aboutsummaryrefslogtreecommitdiff
path: root/src/headerssync.cpp
diff options
context:
space:
mode:
authorPieter Wuille <pieter@wuille.net>2022-08-31 18:19:48 -0400
committerPieter Wuille <pieter@wuille.net>2023-09-28 12:07:54 -0400
commit53d7d35b5899685cd1577156250068e0cab502f4 (patch)
treee586bb11ef370241816c9c24bdc722fe1333e847 /src/headerssync.cpp
parent7899402cff708319b1c5181242a97557eefe1ae7 (diff)
downloadbitcoin-53d7d35b5899685cd1577156250068e0cab502f4.tar.xz
Update parameters in headerssync.cpp
Diffstat (limited to 'src/headerssync.cpp')
-rw-r--r--src/headerssync.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/headerssync.cpp b/src/headerssync.cpp
index f891063cd2..1b5d7305e8 100644
--- a/src/headerssync.cpp
+++ b/src/headerssync.cpp
@@ -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)