diff options
author | Yigit Sever | 2021-04-18 13:02:31 +0300 |
---|---|---|
committer | Yigit Sever | 2021-04-18 13:02:31 +0300 |
commit | 24209c977060e890ed0faed8c6f9b79f22376aa4 (patch) | |
tree | a994391bf4045dff4cab41e6399a5fbd6fbbbf3c /src | |
parent | d2cd8cb7fb9bcaf42a6dd9f74d6ddd1b14a13f33 (diff) | |
download | gradecoin-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')
-rw-r--r-- | src/handlers.rs | 2 |
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 { |