aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/handlers.rs11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/handlers.rs b/src/handlers.rs
index 839443d..c7457c4 100644
--- a/src/handlers.rs
+++ b/src/handlers.rs
@@ -559,6 +559,8 @@ pub async fn propose_block(
559 coinbase_user.balance += BLOCK_REWARD; 559 coinbase_user.balance += BLOCK_REWARD;
560 } 560 }
561 561
562 let holding: HashMap<String, Transaction> = HashMap::new();
563
562 // Play out the transactions 564 // Play out the transactions
563 for fingerprint in new_block.transaction_list.iter() { 565 for fingerprint in new_block.transaction_list.iter() {
564 if let Some(transaction) = pending_transactions.remove(fingerprint) { 566 if let Some(transaction) = pending_transactions.remove(fingerprint) {
@@ -590,6 +592,10 @@ pub async fn propose_block(
590 } 592 }
591 } 593 }
592 594
595 for (fp, tx) in holding.iter() {
596 pending_transactions.insert(fp.to_owned(), tx.to_owned());
597 }
598
593 // just update everyone's .guy file 599 // just update everyone's .guy file
594 for (fp, guy) in users_store.iter() { 600 for (fp, guy) in users_store.iter() {
595 if !guy.is_bot { 601 if !guy.is_bot {
@@ -877,7 +883,10 @@ fn authorize_proposer(jwt_token: String, user_pem: &str) -> Result<TokenData<Cla
877 return Err(String::from("This token has expired")); 883 return Err(String::from("This token has expired"));
878 } 884 }
879 _ => { 885 _ => {
880 warn!("AN UNSPECIFIED ERROR from token: {}\nerr: {:?} key was {}", jwt_token, err, user_pem); 886 warn!(
887 "AN UNSPECIFIED ERROR from token: {}\nerr: {:?} key was {}",
888 jwt_token, err, user_pem
889 );
881 return Err(format!("JWT Error: {}", err)); 890 return Err(format!("JWT Error: {}", err));
882 } 891 }
883 }, 892 },