From e6764a8b76bff8894159109e4a7907b519eb6541 Mon Sep 17 00:00:00 2001 From: necrashter Date: Sat, 23 Apr 2022 17:21:16 +0300 Subject: Print the name of the config in warn logs --- src/handlers.rs | 8 ++++---- 1 file 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( token: String, db: Db, ) -> Result { - warn!("New block proposal: {:?}", &new_block); + warn!("[{}] New block proposal: {:?}", db.config.name, &new_block); // Check if there are enough transactions in the block let block_transaction_count = db.config.block_transaction_count; @@ -543,7 +543,7 @@ pub async fn propose_block( } // All clear, block accepted! - warn!("ACCEPTED BLOCK {:?}", new_block); + warn!("[{}] ACCEPTED BLOCK {:?}", db.config.name, new_block); // Scope the read guards { @@ -648,7 +648,7 @@ pub async fn propose_transaction( token: String, db: Db, ) -> Result { - warn!("New transaction proposal: {:?}", &new_transaction); + warn!("[{}] New transaction proposal: {:?}", db.config.name, &new_transaction); let users_store = db.users.read(); @@ -815,7 +815,7 @@ pub async fn propose_transaction( )); } - warn!("ACCEPTED TRANSACTION {:?}", new_transaction); + warn!("[{}] ACCEPTED TRANSACTION {:?}", db.config.name, new_transaction); let mut transactions = db.pending_transactions.write(); -- cgit v1.2.3-70-g09d2