diff options
author | Yigit Sever | 2022-04-18 21:20:39 +0300 |
---|---|---|
committer | GitHub | 2022-04-18 21:20:39 +0300 |
commit | df0819ce4476f7203c462247f7c2e887163b16b3 (patch) | |
tree | 41e3e833c5cddb9973a639c2451a43976f4b69ab /src/handlers.rs | |
parent | 72b689bba80c372ba5e33d2b425ca31a1e6ddc9e (diff) | |
parent | f3073c4ed82d9b946048f387e7430d8d803cd114 (diff) | |
download | gradecoin-df0819ce4476f7203c462247f7c2e887163b16b3.tar.gz gradecoin-df0819ce4476f7203c462247f7c2e887163b16b3.tar.bz2 gradecoin-df0819ce4476f7203c462247f7c2e887163b16b3.zip |
Merge pull request #8 from oznakn/main
Great catch, thank you!
Diffstat (limited to 'src/handlers.rs')
-rw-r--r-- | src/handlers.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/handlers.rs b/src/handlers.rs index ca0608c..23adffb 100644 --- a/src/handlers.rs +++ b/src/handlers.rs | |||
@@ -554,7 +554,7 @@ pub async fn propose_block( | |||
554 | coinbase_user.balance += BLOCK_REWARD; | 554 | coinbase_user.balance += BLOCK_REWARD; |
555 | } | 555 | } |
556 | 556 | ||
557 | let holding: HashMap<String, Transaction> = HashMap::new(); | 557 | let mut holding: HashMap<String, Transaction> = HashMap::new(); |
558 | 558 | ||
559 | // Play out the transactions | 559 | // Play out the transactions |
560 | for fingerprint in &new_block.transaction_list { | 560 | for fingerprint in &new_block.transaction_list { |
@@ -573,7 +573,7 @@ pub async fn propose_block( | |||
573 | // if the receiver is a bot, they will reciprocate | 573 | // if the receiver is a bot, they will reciprocate |
574 | if users_store.get(target).unwrap().is_bot { | 574 | if users_store.get(target).unwrap().is_bot { |
575 | let transaction_id = calculate_transaction_id(target, source); | 575 | let transaction_id = calculate_transaction_id(target, source); |
576 | pending_transactions.insert( | 576 | holding.insert( |
577 | transaction_id, | 577 | transaction_id, |
578 | Transaction { | 578 | Transaction { |
579 | source: target.clone(), | 579 | source: target.clone(), |