Skip to content

Commit

Permalink
Add additional bucket for amounts between Ӿ0.000001 and Ӿ0.0003
Browse files Browse the repository at this point in the history
include Ӿ0.000001 into new bucket
  • Loading branch information
gr0vity authored and clemahieu committed Jul 9, 2024
1 parent 39d2c65 commit efaa9f5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions nano/node/scheduler/buckets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ void nano::scheduler::buckets::seek ()

void nano::scheduler::buckets::setup_buckets (uint64_t maximum)
{
auto const size_expected = 62;
auto const size_expected = 63;
auto bucket_max = std::max<size_t> (1u, maximum / size_expected);
auto build_region = [&] (uint128_t const & begin, uint128_t const & end, size_t count) {
auto width = (end - begin) / count;
Expand All @@ -36,7 +36,8 @@ void nano::scheduler::buckets::setup_buckets (uint64_t maximum)
buckets_m.push_back (std::make_unique<scheduler::bucket> (begin + i * width, bucket_max));
}
};
build_region (0, uint128_t{ 1 } << 88, 1);
build_region (0, uint128_t{ 1 } << 79, 1);
build_region (uint128_t{ 1 } << 79, uint128_t{ 1 } << 88, 1);
build_region (uint128_t{ 1 } << 88, uint128_t{ 1 } << 92, 2);
build_region (uint128_t{ 1 } << 92, uint128_t{ 1 } << 96, 4);
build_region (uint128_t{ 1 } << 96, uint128_t{ 1 } << 100, 8);
Expand Down

0 comments on commit efaa9f5

Please sign in to comment.