diff --git a/pallets/node-authorization/src/tests.rs b/pallets/node-authorization/src/tests.rs index 4d01878b..02506d17 100644 --- a/pallets/node-authorization/src/tests.rs +++ b/pallets/node-authorization/src/tests.rs @@ -463,14 +463,14 @@ fn test_generate_peer_id_invalid_utf8() { #[test] fn peer_id_too_long_test() -> Result<(), Error> { new_test_ext().execute_with(|| { - const max_peer_id_length: usize = 128; + const MAX_PEER_ID_LENGTH: usize = 128; let testing = "nodeidnodeidnodeidnodeidnodeidnodeidnodeidnodeidnodeidnodeidnodeidnodeidnodeidnodeidnodeidnodeidnodeidnodeidnodeidnodeidnodeidnodeidnodeidnodeidnodeidnodeidnodeidnodeidnodeidnodeidnodeidnodeid"; let node_identity = test_node(&testing); let testing = NodeAuthorization::generate_peer_id(&node_identity).unwrap(); - // assert!(testing.0.len() > max_peer_id_length,Error::::PeerIdTooLong); - if testing.0.len() > max_peer_id_length { + // assert!(testing.0.len() > MAX_PEER_ID_LENGTH,Error::::PeerIdTooLong); + if testing.0.len() > MAX_PEER_ID_LENGTH { return Err(Error::::PeerIdTooLong); } Ok(())