aboutsummaryrefslogtreecommitdiff
path: root/src/headerssync.h
diff options
context:
space:
mode:
authordergoegge <n.goeggi@gmail.com>2022-12-12 21:05:33 +0000
committerdergoegge <n.goeggi@gmail.com>2022-12-12 21:06:04 +0000
commit53552affca381cdb5103ecdbcc7f3fb562e66ac4 (patch)
tree294e419b4e04ef1f222a450cedd57cf6d738d1a3 /src/headerssync.h
parent5b3f05b7eb76f4c973149649d94c5e91d5cb4c1b (diff)
downloadbitcoin-53552affca381cdb5103ecdbcc7f3fb562e66ac4.tar.xz
[headerssync] Make m_commit_offset protected
Diffstat (limited to 'src/headerssync.h')
-rw-r--r--src/headerssync.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/headerssync.h b/src/headerssync.h
index 16da964246..e93f67e6da 100644
--- a/src/headerssync.h
+++ b/src/headerssync.h
@@ -175,6 +175,13 @@ public:
*/
CBlockLocator NextHeadersRequestLocator() const;
+protected:
+ /** The (secret) offset on the heights for which to create commitments.
+ *
+ * m_header_commitments entries are created at any height h for which
+ * (h % HEADER_COMMITMENT_PERIOD) == m_commit_offset. */
+ const unsigned m_commit_offset;
+
private:
/** Clear out all download state that might be in progress (freeing any used
* memory), and mark this object as no longer usable.
@@ -222,12 +229,6 @@ private:
/** A queue of commitment bits, created during the 1st phase, and verified during the 2nd. */
bitdeque<> m_header_commitments;
- /** The (secret) offset on the heights for which to create commitments.
- *
- * m_header_commitments entries are created at any height h for which
- * (h % HEADER_COMMITMENT_PERIOD) == m_commit_offset. */
- const unsigned m_commit_offset;
-
/** m_max_commitments is a bound we calculate on how long an honest peer's chain could be,
* given the MTP rule.
*