Mt 0.24 restore balances
5 unresolved threads
5 unresolved threads
restore balances
Merge request reports
Activity
- libraries/chain/util/hf23_helper.cpp 0 → 100644
87 const fc::variants& items = obj.get_array(); 88 for( auto& item : items ) 89 res.emplace_back( from_variant( item ) ); 90 } 91 } 92 catch ( const std::exception& e ) 93 { 94 elog( "Error while dump reading: ${e}", ("e", e.what()) ); 95 } 96 catch ( const fc::exception& e ) 97 { 98 elog( "Error while dump reading: ${e}", ("e", e.what()) ); 99 } 100 catch (...) 101 { 102 elog( "Error while writing dump data to file ${filename}", changed this line in version 2 of the diff
16 namespace steem { namespace chain { 17 18 class hf23_helper 19 { 20 public: 21 22 struct hf23_item 23 { 24 std::string name; 25 26 asset balance; 27 asset sbd_balance; 28 29 bool operator == ( const hf23_item& obj ) const 30 { 31 return balance == obj.balance && sbd_balance == obj.sbd_balance; Why 'name' member is ignored here?
Edited by Bartek Wronachanged this line in version 2 of the diff
20 public: 21 22 struct hf23_item 23 { 24 std::string name; 25 26 asset balance; 27 asset sbd_balance; 28 29 bool operator == ( const hf23_item& obj ) const 30 { 31 return balance == obj.balance && sbd_balance == obj.sbd_balance; 32 } 33 34 static hf23_item get_balances( const account_object& obj ) 35 { changed this line in version 2 of the diff
added 1 commit
- 563eb153 - Cleaning + refactoring + small fix in `hf23_helper` class
everything done
Edited by Mariusz Trela- Resolved by Bartek Wrona
1636 auto zero_sbd = asset( 0 , SBD_SYMBOL ); 1637 1638 for( auto& name : restored_accounts ) 1639 { 1640 auto found = balances.find( hf23_helper::hf23_item{ name, zero_steem, zero_sbd } ); 1641 1642 if( found == balances.end() ) 1643 continue; 1644 1645 const auto* account_ptr = find_account( name ); 1646 if( account_ptr == nullptr ) 1647 continue; 1648 1649 modify( *account_ptr, [&]( account_object& a ) 1650 { 1651 a.sbd_balance = found->sbd_balance; changed this line in version 4 of the diff
- Resolved by Bartek Wrona
- Resolved by Bartek Wrona
added 1 commit
- 6759bfb2 - Serious problems during restoring accounts fixed + saving to internal array instead of file
1641 if( found == balances.end() ) 1642 { 1643 ilog( "The account ${acc} hadn't removed balances, balances can't be restored", ( "acc", name ) ); 1644 continue; 1645 } 1646 1647 const auto* account_ptr = find_account( name ); 1648 if( account_ptr == nullptr ) 1649 { 1650 ilog( "The account ${acc} doesn't exist at all, balances can't be restored", ( "acc", name ) ); 1651 continue; 1652 } 1653 1654 FC_ASSERT( treasury_account.sbd_balance >= found->sbd_balance, "The treasury account has ${treasury_asset} but ${req_asset} is required", 1655 ( "treasury_asset", treasury_account.sbd_balance )( "req_asset", found->sbd_balance ) ); 1656 changed this line in version 5 of the diff
mentioned in commit 3f288a08
mentioned in issue #21 (closed)
Please register or sign in to reply