Increase the limit for the maximum size of the telemetry name (#6523)

* Increase the limit for the maximum size of the telemetry name

* Fix test
This commit is contained in:
Pierre Krieger
2020-06-26 16:48:11 +02:00
committed by GitHub
parent dd3333f8b4
commit 505540a2a0
2 changed files with 4 additions and 2 deletions
+3 -1
View File
@@ -610,7 +610,9 @@ mod tests {
#[test]
fn tests_node_name_bad() {
assert!(is_node_name_valid("long names are not very cool for the ui").is_err());
assert!(is_node_name_valid(
"very very long names are really not very cool for the ui at all, really they're not"
).is_err());
assert!(is_node_name_valid("Dots.not.Ok").is_err());
assert!(is_node_name_valid("http://visit.me").is_err());
assert!(is_node_name_valid("https://visit.me").is_err());
+1 -1
View File
@@ -36,7 +36,7 @@ use std::net::SocketAddr;
use std::path::PathBuf;
/// The maximum number of characters for a node name.
pub(crate) const NODE_NAME_MAX_LENGTH: usize = 32;
pub(crate) const NODE_NAME_MAX_LENGTH: usize = 64;
/// default sub directory to store network config
pub(crate) const DEFAULT_NETWORK_CONFIG_PATH: &'static str = "network";