Skip to content

Commit

Permalink
Comments on std hashmap bucket defaults.
Browse files Browse the repository at this point in the history
  • Loading branch information
evoskuil committed Jan 13, 2025
1 parent f5440a3 commit 66a7516
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/bitcoin/node/chasers/chaser_organize.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,8 @@ class chaser_organize

// These are protected by strand.
chain_state::ptr state_{};

// TODO: optimize, default bucket count is around 8.
block_tree tree_{};
};

Expand Down
1 change: 1 addition & 0 deletions include/bitcoin/node/protocols/protocol_block_in.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ class BCN_API protocol_block_in

struct track
{
// TODO: optimize, default bucket count is around 8.
hashmap ids{};
size_t announced{};
system::hash_digest last{};
Expand Down
1 change: 1 addition & 0 deletions include/bitcoin/node/sessions/session_outbound.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ class BCN_API session_outbound
const float allowed_deviation_;

// This is protected by strand.
// TODO: optimize, default bucket count is around 8.
std::unordered_map<object_key, double> speeds_{};
};

Expand Down

0 comments on commit 66a7516

Please sign in to comment.