diff options
Diffstat (limited to 'src/handlers.rs')
| -rw-r--r-- | src/handlers.rs | 9 |
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}; | |||
| 27 | use crate::PRIVATE_KEY; | 27 | use crate::PRIVATE_KEY; |
| 28 | 28 | ||
| 29 | // Valid blocks should have this many transactions | 29 | // Valid blocks should have this many transactions |
| 30 | const BLOCK_TRANSACTION_COUNT: u8 = 8; | 30 | const BLOCK_TRANSACTION_COUNT: u8 = 4; |
| 31 | // Inital registration bonus | 31 | // Inital registration bonus |
| 32 | const REGISTER_BONUS: u16 = 40; | 32 | const REGISTER_BONUS: u16 = 20; |
| 33 | // Coinbase reward | 33 | // Coinbase reward |
| 34 | const BLOCK_REWARD: u16 = 3; | 34 | const BLOCK_REWARD: u16 = 2; |
| 35 | // Transaction amount limit | 35 | // Transaction amount limit |
| 36 | const TX_UPPER_LIMIT: u16 = 10; | 36 | const TX_UPPER_LIMIT: u16 = 4; |
| 37 | const TX_LOWER_LIMIT: u16 = 1; | 37 | const TX_LOWER_LIMIT: u16 = 1; |
| 38 | // Transaction traffic reward | 38 | // Transaction traffic reward |
| 39 | const TX_TRAFFIC_REWARD: u16 = 1; | 39 | const 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 |
