-
Notifications
You must be signed in to change notification settings - Fork 4.9k
replace 'daddr' checks with 'is_valid_address()' #681
Conversation
Thanks! You'll need to run the latest |
this looks great! Can you add test as well, something that does a
for port 0, multicast, unspecified... |
@garious running |
It's possible I'm pickier than Clippy. :) Push the patch with the formatted code and let's see what CI says about it. |
Looks good, but needs to be rebased. |
💔 Unable to automerge due to merge conflict |
💔 Unable to automerge due to CI failure |
automerge is a little busted right now, haven't had a chance to debug why. I'll keep eye on this PR and merge once CI is green in the meantime |
Close, cargo fmt -- --write-mode=check
Diff in /solana/src/crdt.rs at line 1919:
assert!(!me.alive.contains_key(&node_with_same_addr.id));
assert!(me.alive[&node_with_diff_addr.id] > 0);
}
-
+
#[test]
fn test_is_valid_address() {
let bad_address_port = "127.0.0.1:0".parse().unwrap(); |
Will merge in #721 after CI passes. |
Bumps [rollup](https://github.com/rollup/rollup) from 2.32.0 to 2.32.1. - [Release notes](https://github.com/rollup/rollup/releases) - [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md) - [Commits](rollup/rollup@v2.32.0...v2.32.1) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
defined a new function
is_valid_address
as suggested in #656 to use Rust'sip().is_unspecified()
andip().is_multicast()
functions instead of comparing against0.0.0.0:0