diff options
author | necrashter | 2022-04-23 17:21:16 +0300 |
---|---|---|
committer | Yigit Sever | 2022-04-23 18:10:12 +0300 |
commit | e6764a8b76bff8894159109e4a7907b519eb6541 (patch) | |
tree | 704fb1adba0ae78f05288473c3317b91bdf191d0 /src/handlers.rs | |
parent | d2354a6b8af567afab7873645f6878f39d0de3fd (diff) | |
download | gradecoin-e6764a8b76bff8894159109e4a7907b519eb6541.tar.gz gradecoin-e6764a8b76bff8894159109e4a7907b519eb6541.tar.bz2 gradecoin-e6764a8b76bff8894159109e4a7907b519eb6541.zip |
Print the name of the config in warn logs
Diffstat (limited to 'src/handlers.rs')
-rw-r--r-- | src/handlers.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/handlers.rs b/src/handlers.rs index 6619924..01e2c4f 100644 --- a/src/handlers.rs +++ b/src/handlers.rs | |||
@@ -386,7 +386,7 @@ pub async fn propose_block( | |||
386 | token: String, | 386 | token: String, |
387 | db: Db, | 387 | db: Db, |
388 | ) -> Result<impl warp::Reply, warp::Rejection> { | 388 | ) -> Result<impl warp::Reply, warp::Rejection> { |
389 | warn!("New block proposal: {:?}", &new_block); | 389 | warn!("[{}] New block proposal: {:?}", db.config.name, &new_block); |
390 | 390 | ||
391 | // Check if there are enough transactions in the block | 391 | // Check if there are enough transactions in the block |
392 | let block_transaction_count = db.config.block_transaction_count; | 392 | let block_transaction_count = db.config.block_transaction_count; |
@@ -543,7 +543,7 @@ pub async fn propose_block( | |||
543 | } | 543 | } |
544 | 544 | ||
545 | // All clear, block accepted! | 545 | // All clear, block accepted! |
546 | warn!("ACCEPTED BLOCK {:?}", new_block); | 546 | warn!("[{}] ACCEPTED BLOCK {:?}", db.config.name, new_block); |
547 | 547 | ||
548 | // Scope the read guards | 548 | // Scope the read guards |
549 | { | 549 | { |
@@ -648,7 +648,7 @@ pub async fn propose_transaction( | |||
648 | token: String, | 648 | token: String, |
649 | db: Db, | 649 | db: Db, |
650 | ) -> Result<impl warp::Reply, warp::Rejection> { | 650 | ) -> Result<impl warp::Reply, warp::Rejection> { |
651 | warn!("New transaction proposal: {:?}", &new_transaction); | 651 | warn!("[{}] New transaction proposal: {:?}", db.config.name, &new_transaction); |
652 | 652 | ||
653 | let users_store = db.users.read(); | 653 | let users_store = db.users.read(); |
654 | 654 | ||
@@ -815,7 +815,7 @@ pub async fn propose_transaction( | |||
815 | )); | 815 | )); |
816 | } | 816 | } |
817 | 817 | ||
818 | warn!("ACCEPTED TRANSACTION {:?}", new_transaction); | 818 | warn!("[{}] ACCEPTED TRANSACTION {:?}", db.config.name, new_transaction); |
819 | 819 | ||
820 | let mut transactions = db.pending_transactions.write(); | 820 | let mut transactions = db.pending_transactions.write(); |
821 | 821 | ||