@@ -45,9 +45,9 @@ class BCS_API estimator
4545 // / Pass zero to target next block for confirmation, range:0..1007.
4646 uint64_t estimate (size_t target, mode mode) const NOEXCEPT;
4747
48- // / Populate accumulator.
48+ // / Populate accumulator with count blocks up to the top confirmed block .
4949 bool initialize (std::atomic_bool& cancel, const node::query& query,
50- size_t top, size_t count) NOEXCEPT;
50+ size_t count) NOEXCEPT;
5151
5252 // / Update accumulator.
5353 bool push (const node::query& query) NOEXCEPT;
@@ -60,22 +60,14 @@ class BCS_API estimator
6060 using rates = database::fee_rates;
6161 using rate_sets = database::fee_rate_sets;
6262
63- // / Bucket count sizing parameters.
63+ // / Bucket depth sizing parameters.
6464 enum horizon : size_t
6565 {
6666 small = 12 ,
6767 medium = 48 ,
6868 large = 1008
6969 };
7070
71- // / Estimation confidences.
72- struct confidence
73- {
74- static constexpr double low = 0.60 ;
75- static constexpr double mid = 0.85 ;
76- static constexpr double high = 0.95 ;
77- };
78-
7971 // / Bucket count sizing parameters.
8072 struct sizing
8173 {
@@ -87,17 +79,25 @@ class BCS_API estimator
8779 static constexpr size_t count = 283 ;
8880 };
8981
82+ // / Estimation confidences.
83+ struct confidence
84+ {
85+ static constexpr double low = 0.60 ;
86+ static constexpr double mid = 0.85 ;
87+ static constexpr double high = 0.95 ;
88+ };
89+
9090 // / Accumulator (persistent, decay-weighted counters).
9191 struct accumulator
9292 {
93- template <size_t Depth >
93+ template <size_t Horizon >
9494 struct bucket
9595 {
9696 // / Total scaled txs in bucket.
9797 std::atomic<size_t > total{};
9898
9999 // / confirmed[n]: scaled txs confirmed in > n blocks.
100- std::array<std::atomic<size_t >, Depth > confirmed;
100+ std::array<std::atomic<size_t >, Horizon > confirmed;
101101 };
102102
103103 // / Current block height of accumulated state.
0 commit comments