-
Notifications
You must be signed in to change notification settings - Fork 64
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
update dependencies #219
update dependencies #219
Conversation
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.
Thanks for the updates! Changes are not compiling rn, could you check it out @jxs?
src/socket/filter/mod.rs
Outdated
known_addrs: LruCache::new(KNOWN_ADDRS_SIZE.try_into().unwrap()), | ||
banned_nodes: LruCache::new(BANNED_NODES_SIZE.try_into().unwrap()), |
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.
Neither of those should be a runtime error (if it was then we should be using expect
instead of unwrap
)
you can instead change the declarations to
const KNOWN_ADDRS_SIZE: NonZeroUsize = match NonZeroUsize::new(500) {
Some(non_zero) => non_zero,
None => panic!("clearly non zero"),
};
to get a compile time check via const-panic
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.
thanks Diva, yeah I assumed not being able to unwrap
meant one couldn't panic!()
in const fn
s but it's possible, I used unreachable!()
intead of panic!()
inc ptal.
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.
perfect, thanks
* Version bump to v0.3.1 (#203) * fix docs (#204) * refactor for removing `Discv5` prefix (#206) * goodbye prefix * adjust docs * fix rpc decoding to reject extra data (#208) * reject extra data * reduce diff * expected_responses remains after challenge has been completed (#210) * Replace `Handler::spawn` with `build_handler()` and `Handler::start()` * Test the handler's states after the handler has been terminated * Remove expected response on handle_auth_message() * Rename variables for readability * Expose local ENR Arc (#214) * Use zero ports in tests (#216) * update dependencies (#219) * Changing port of ReponseBody::Pong to NonZeroU16 (#220) * Change `port` from u16 to NonZeroU16 * Fix tests * Fix test: the PONG port can't be zero * Fix clippy warnings * Update 'enr' dependency (#223) * Add support for concurrent requests to a single peer. (#200) Co-authored-by: ackintosh <[email protected]> Co-authored-by: Diva M <[email protected]> Co-authored-by: Age Manning <[email protected]> * Adjust some logs (#225) * remove log for timed out query. This is always informed in the callback * expand common logs, unify info on startup * adjust auth header log * Update src/service.rs * Appease clippy * Realised I was wrong. Don't need this log, my bad * fmt --------- Co-authored-by: Age Manning <[email protected]> * Version bump to v0.4.0 * make tracing-subscriber a dev dep (#226) * Fix warnings and bump libp2p (#232) * Update session_cache_capacity from usize to NonZeroUsize since the argument of LruCache::new is NonZeroUsize. * Fix rustdoc * cargo fmt * Fix a merging mistake: lost validation in Message::decode --------- Co-authored-by: Age Manning <[email protected]> Co-authored-by: Divma <[email protected]> Co-authored-by: Jack McPherson <[email protected]> Co-authored-by: João Oliveira <[email protected]> Co-authored-by: Milos Stankovic <[email protected]> Co-authored-by: Nick Gheorghita <[email protected]> Co-authored-by: Diva M <[email protected]>
Description
and unify libp2p dep
Change checklist