From fc9aa0c69b11f6ec93255b984839e0c2418a63cf Mon Sep 17 00:00:00 2001 From: Yigit Sever Date: Wed, 14 Apr 2021 00:34:39 +0300 Subject: Add empty block test --- src/validators.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/validators.rs') diff --git a/src/validators.rs b/src/validators.rs index dbebee8..31344d8 100644 --- a/src/validators.rs +++ b/src/validators.rs @@ -1,14 +1,14 @@ -// Custom validators incoming data +/// Custom validators incoming data use log::error; use serde::de::{Deserializer, Error as DeserializerError, Unexpected}; use serde::ser::{Error as SerializerError, Serializer}; use serde::Deserialize; -pub mod validate_game_rating { +pub mod validate_block { use super::*; - const ERROR_MESSAGE: &str = "rating must be a number between 0 and 100"; + const ERROR_MESSAGE: &str = "block cannot have an empty transaction list"; pub fn deserialize<'de, D>(deserializer: D) -> Result where -- cgit v1.2.3-70-g09d2