aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYigit Sever2021-04-18 13:02:31 +0300
committerYigit Sever2021-04-18 13:02:31 +0300
commit13bd3b54a51f5862e79ea4be1874265fa1cd9a10 (patch)
tree0312fd87c4b36a48a9cbbde94e0912f52ac2410e
parent471b9a45c44534dc7b193982bcfa53d55f79e75e (diff)
downloadgradecoin-13bd3b54a51f5862e79ea4be1874265fa1cd9a10.tar.gz
gradecoin-13bd3b54a51f5862e79ea4be1874265fa1cd9a10.tar.bz2
gradecoin-13bd3b54a51f5862e79ea4be1874265fa1cd9a10.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
-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 {