From 24209c977060e890ed0faed8c6f9b79f22376aa4 Mon Sep 17 00:00:00 2001 From: Yigit Sever Date: Sun, 18 Apr 2021 13:02:31 +0300 Subject: Fix transaction blocking bug We used to insert transactions by their source field. Then we started using by (actually unique). This bug caused only one bank transaction to exist at any time --- src/handlers.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/handlers.rs') diff --git a/src/handlers.rs b/src/handlers.rs index df6e033..30a35e7 100644 --- a/src/handlers.rs +++ b/src/handlers.rs @@ -659,7 +659,7 @@ pub async fn propose_transaction( let mut transactions = db.pending_transactions.write(); - transactions.insert(new_transaction.source.to_owned(), new_transaction); + transactions.insert(new_transaction.by.to_owned(), new_transaction); Ok(warp::reply::with_status( warp::reply::json(&GradeCoinResponse { -- cgit v1.2.3-70-g09d2