From e0fb91039f34204b2a5c588a95cb3f1789ad2fa7 Mon Sep 17 00:00:00 2001 From: Yigit Sever Date: Mon, 12 Apr 2021 05:32:53 +0300 Subject: 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 --- src/main.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/main.rs') 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 @@ +use gradecoin::schema::create_database; use std::env; use warp::Filter; -mod handlers; mod custom_filters; +mod handlers; mod routes; -mod schema; // mod validators; #[tokio::main] @@ -15,7 +15,7 @@ async fn main() { } pretty_env_logger::init(); - let db = schema::create_database(); + let db = create_database(); let api = routes::consensus_routes(db); -- cgit v1.2.3-70-g09d2