aboutsummaryrefslogtreecommitdiffstats
path: root/src/handlers.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/handlers.rs')
-rw-r--r--src/handlers.rs9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/handlers.rs b/src/handlers.rs
index a64c012..96001ce 100644
--- a/src/handlers.rs
+++ b/src/handlers.rs
@@ -27,13 +27,13 @@ use warp::{http::StatusCode, reply};
27use crate::PRIVATE_KEY; 27use crate::PRIVATE_KEY;
28 28
29// Valid blocks should have this many transactions 29// Valid blocks should have this many transactions
30const BLOCK_TRANSACTION_COUNT: u8 = 8; 30const BLOCK_TRANSACTION_COUNT: u8 = 4;
31// Inital registration bonus 31// Inital registration bonus
32const REGISTER_BONUS: u16 = 40; 32const REGISTER_BONUS: u16 = 20;
33// Coinbase reward 33// Coinbase reward
34const BLOCK_REWARD: u16 = 3; 34const BLOCK_REWARD: u16 = 2;
35// Transaction amount limit 35// Transaction amount limit
36const TX_UPPER_LIMIT: u16 = 10; 36const TX_UPPER_LIMIT: u16 = 4;
37const TX_LOWER_LIMIT: u16 = 1; 37const TX_LOWER_LIMIT: u16 = 1;
38// Transaction traffic reward 38// Transaction traffic reward
39const TX_TRAFFIC_REWARD: u16 = 1; 39const TX_TRAFFIC_REWARD: u16 = 1;
@@ -278,6 +278,7 @@ pub async fn authenticate_user(
278 }; 278 };
279 279
280 // is the student in AuthRequest privileged? 280 // is the student in AuthRequest privileged?
281 // TODO: this is the only check for 'if metuid is approved' <15-04-22, yigit> //
281 let privileged_student_id = 282 let privileged_student_id =
282 if let Some(id) = MetuId::new(request.student_id.clone(), request.passwd.clone()) { 283 if let Some(id) = MetuId::new(request.student_id.clone(), request.passwd.clone()) {
283 id 284 id