aboutsummaryrefslogtreecommitdiffstats
path: root/src/handlers.rs
diff options
context:
space:
mode:
authorYigit Sever2021-04-18 13:02:31 +0300
committerYigit Sever2021-04-18 13:02:31 +0300
commit24209c977060e890ed0faed8c6f9b79f22376aa4 (patch)
treea994391bf4045dff4cab41e6399a5fbd6fbbbf3c /src/handlers.rs
parentd2cd8cb7fb9bcaf42a6dd9f74d6ddd1b14a13f33 (diff)
downloadgradecoin-24209c977060e890ed0faed8c6f9b79f22376aa4.tar.gz
gradecoin-24209c977060e890ed0faed8c6f9b79f22376aa4.tar.bz2
gradecoin-24209c977060e890ed0faed8c6f9b79f22376aa4.zip
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
Diffstat (limited to 'src/handlers.rs')
-rw-r--r--src/handlers.rs2
1 files changed, 1 insertions, 1 deletions
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(
659 659
660 let mut transactions = db.pending_transactions.write(); 660 let mut transactions = db.pending_transactions.write();
661 661
662 transactions.insert(new_transaction.source.to_owned(), new_transaction); 662 transactions.insert(new_transaction.by.to_owned(), new_transaction);
663 663
664 Ok(warp::reply::with_status( 664 Ok(warp::reply::with_status(
665 warp::reply::json(&GradeCoinResponse { 665 warp::reply::json(&GradeCoinResponse {