From 412116978169701479814d433a8bad73bfa54e02 Mon Sep 17 00:00:00 2001 From: Yigit Sever Date: Wed, 14 Apr 2021 21:28:37 +0300 Subject: Accepted block transactions play out now --- src/schema.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/schema.rs') diff --git a/src/schema.rs b/src/schema.rs index 6402724..2a9e1db 100644 --- a/src/schema.rs +++ b/src/schema.rs @@ -37,7 +37,7 @@ fn last_block_exists() -> (bool, String) { } fn read_block_name() -> io::Result> { - let mut entries = fs::read_dir("./blocks")? + let entries = fs::read_dir("./blocks")? .map(|res| res.map(|e| e.path())) .collect::, io::Error>>()?; @@ -89,13 +89,10 @@ pub struct Claims { /// /// [`Db::users`] is the in memory representation of the users, with their public keys, metu_ids and /// gradecoin balances. -/// -/// TODO: Replace the pending_transactions HashMap with -/// HashMap #[derive(Debug, Clone)] pub struct Db { pub blockchain: Arc>, - pub pending_transactions: Arc>>, + pub pending_transactions: Arc>>, pub users: Arc>>, } @@ -166,7 +163,7 @@ pub struct User { pub balance: i32, } -/// The values will be hard coded so MetuId::new() can accept/reject values based on that +/// The values are hard coded in [`OUR_STUDENTS`] so MetuId::new() can accept/reject values based on that #[derive(Serialize, Deserialize, Debug, PartialEq)] pub struct MetuId { id: String, -- cgit v1.2.3-70-g09d2