Added some tests and text in readme.

This commit is contained in:
Revertron
2021-05-09 16:58:14 +02:00
parent 734529098c
commit f9c1bf1679
3 changed files with 17 additions and 6 deletions
+3
View File
@@ -176,6 +176,9 @@ mod test {
assert!(!check_domain("ab.c-", true));
assert!(!check_domain(".ab.c", true));
assert!(!check_domain("ab.c-", true));
assert!(check_domain("a.com", true));
assert!(check_domain("ab.com", true));
assert!(check_domain("abc.com", true));
assert!(check_domain("777.com", true));
assert!(!check_domain("77.com", true));
assert!(!check_domain("7.com", true));
+1
View File
@@ -71,6 +71,7 @@ impl Network {
// Starting peer connections to bootstrap nodes
peers.connect_peers(&peers_addrs, &poll.registry(), &mut unique_token, yggdrasil_only);
bootstrap_timer = Instant::now();
last_events_time = Instant::now();
}
// Poll Mio for events, blocking until we get an event.
poll.poll(&mut events, POLL_TIMEOUT).expect("Error polling sockets");