mirror of
https://github.com/jmcorgan/fips.git
synced 2026-08-10 00:26:59 +00:00
Merge branch 'master' into next
This commit is contained in:
@@ -439,7 +439,15 @@ mod tests {
|
||||
fn test_tree_announce_validate_semantics_accepts_valid_non_root() {
|
||||
use crate::identity::Identity;
|
||||
|
||||
let identity = Identity::generate();
|
||||
// Regenerate until the random identity's node_addr is numerically
|
||||
// larger than both fixed parent (02:..) and root (01:..), so the
|
||||
// root-minimum invariant holds deterministically.
|
||||
let identity = loop {
|
||||
let id = Identity::generate();
|
||||
if id.node_addr().as_bytes()[0] > 1 {
|
||||
break id;
|
||||
}
|
||||
};
|
||||
let node_addr = *identity.node_addr();
|
||||
let parent = make_node_addr(2);
|
||||
let root = make_node_addr(1);
|
||||
|
||||
Reference in New Issue
Block a user