-
Notifications
You must be signed in to change notification settings - Fork 4
Small fixes #164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Small fixes #164
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -44,7 +44,7 @@ const K_K: usize = get_k_k(); | |
| const K_ID_LEN_BYTES: usize = 16; | ||
| const K_NONCE_LEN: usize = 4; | ||
| const K_DIFF_MIN_BIT: usize = 8; | ||
| const K_DIFF_PRODUCED_BIT: usize = 8; | ||
| const K_DIFF_PRODUCED_BIT: usize = 20; | ||
|
||
|
|
||
| const fn get_k_k() -> usize { | ||
| match option_env!("KADCAST_K") { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pre-generating
PeerNodes here setsseen_atat generation time (Node::newusesInstant::now()), so ifPeerNode::generatebecomes slow (e.g., due to the increased PoW difficulty) nodes may already be close to (or past)node_ttlby the time they’re inserted. That can change the behavior of this TTL-sensitive test and make it flaky. To keep the PoW work out of the timed portion without aging the nodes, consider precomputing theBinaryIDs up front and constructingPeerNodes viaPeerNode::from_socketright before insertion (soseen_atis set at insertion time).