File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -88,17 +88,17 @@ bool CLASS::get_block_fees(fee_rates& out,
8888
8989TEMPLATE
9090bool CLASS::get_branch_fees (std::atomic_bool& cancel, fee_rate_sets& out,
91- size_t top , size_t count) const NOEXCEPT
91+ size_t start , size_t count) const NOEXCEPT
9292{
9393 out.clear ();
9494 if (is_zero (count))
9595 return true ;
9696
97- if (top > get_top_confirmed ( ))
97+ if (system::is_add_overflow (start, sub1 (count) ))
9898 return false ;
9999
100- const auto start = top - sub1 (count);
101- if (system::is_subtract_overflow (top, sub1 (count) ))
100+ const auto last = start + sub1 (count);
101+ if (last > get_top_confirmed ( ))
102102 return false ;
103103
104104 out.resize (count);
Original file line number Diff line number Diff line change @@ -409,7 +409,7 @@ class query
409409 bool get_tx_fees (fee_rate& out, const tx_link& link) const NOEXCEPT;
410410 bool get_block_fees (fee_rates& out, const header_link& link) const NOEXCEPT;
411411 bool get_branch_fees (std::atomic_bool& cancel, fee_rate_sets& out,
412- size_t top , size_t count) const NOEXCEPT;
412+ size_t start , size_t count) const NOEXCEPT;
413413
414414 // / Merkle.
415415 // / -----------------------------------------------------------------------
You can’t perform that action at this time.
0 commit comments