Fix a bug where initial_bts_accounts' balances weren't correctly accounted in total_supply
This commit is contained in:
parent
f90c8a4101
commit
77fb78b841
1 changed files with 7 additions and 5 deletions
|
|
@ -642,12 +642,14 @@ void database::init_genesis(const genesis_state_type& genesis_state)
|
||||||
|
|
||||||
// Create balances for all bts accounts
|
// Create balances for all bts accounts
|
||||||
for( const auto& account : genesis_state.initial_bts_accounts )
|
for( const auto& account : genesis_state.initial_bts_accounts )
|
||||||
if (account.core_balance != share_type())
|
if (account.core_balance != share_type()) {
|
||||||
create<account_balance_object>([&](account_balance_object& b) {
|
total_supplies[asset_id_type()] += account.core_balance;
|
||||||
b.owner = get_account_id(account.name);
|
|
||||||
b.balance = account.core_balance;
|
|
||||||
});
|
|
||||||
|
|
||||||
|
create<account_balance_object>([&](account_balance_object& b) {
|
||||||
|
b.owner = get_account_id(account.name);
|
||||||
|
b.balance = account.core_balance;
|
||||||
|
});
|
||||||
|
}
|
||||||
// Create initial balances
|
// Create initial balances
|
||||||
share_type total_allocation;
|
share_type total_allocation;
|
||||||
for( const auto& handout : genesis_state.initial_balances )
|
for( const auto& handout : genesis_state.initial_balances )
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue