aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.rs
diff options
context:
space:
mode:
authorYigit Sever2021-04-12 05:32:53 +0300
committerYigit Sever2021-04-12 05:32:53 +0300
commit44d21b676f90a2fc8b255eb9c1393e53f40c9daa (patch)
treeedfadfd279dc9fcfaa6c27f819c7f0e69d14599c /src/main.rs
parent6c0345ecda5e46da88bc6ca513a28c648c29833c (diff)
downloadgradecoin-44d21b676f90a2fc8b255eb9c1393e53f40c9daa.tar.gz
gradecoin-44d21b676f90a2fc8b255eb9c1393e53f40c9daa.tar.bz2
gradecoin-44d21b676f90a2fc8b255eb9c1393e53f40c9daa.zip
Implement proof-of-work
Using blacke2s: https://docs.rs/blake2/0.9.1/blake2/ Using this guy's hash checker https://gist.github.com/gkbrk/2e4835e3a17b3fb6e1e7 blacke2s with 5 bits 0 can mine a block between 20 seconds to 359 during my tests, hope it'll be fun
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main.rs b/src/main.rs
index 373223c..5683aea 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1,10 +1,10 @@
1use gradecoin::schema::create_database;
1use std::env; 2use std::env;
2use warp::Filter; 3use warp::Filter;
3 4
4mod handlers;
5mod custom_filters; 5mod custom_filters;
6mod handlers;
6mod routes; 7mod routes;
7mod schema;
8// mod validators; 8// mod validators;
9 9
10#[tokio::main] 10#[tokio::main]
@@ -15,7 +15,7 @@ async fn main() {
15 } 15 }
16 pretty_env_logger::init(); 16 pretty_env_logger::init();
17 17
18 let db = schema::create_database(); 18 let db = create_database();
19 19
20 let api = routes::consensus_routes(db); 20 let api = routes::consensus_routes(db);
21 21