Skip to content

Commit

Permalink
fixed bug (#334)
Browse files Browse the repository at this point in the history
  • Loading branch information
briancorbin authored May 27, 2022
1 parent b0b9d6b commit c0ff4c1
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions full-service/src/service/balance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -282,15 +282,16 @@ where

let mut min_synced_block_index = network_block_height - 1;
let mut account_ids = Vec::new();

for account in accounts {
let account_id = AccountID(account.account_id_hex.clone());
let balance = Self::get_balance_inner(&account_id.to_string(), None, &conn)?;
account_map.insert(account_id.clone(), account.clone());
unspent += balance.0;
pending += balance.1;
spent += balance.2;
secreted += balance.3;
orphaned += balance.4;
pending += balance.2;
spent += balance.3;
secreted += balance.4;
orphaned += balance.5;

// account.next_block_index is an index in range [0..ledger_db.num_blocks()]
min_synced_block_index = std::cmp::min(
Expand Down

0 comments on commit c0ff4c1

Please sign in to comment.