Fix genesis init bug; #17
This commit is contained in:
parent
0c8b469e64
commit
8a8130f620
2 changed files with 7 additions and 1 deletions
|
|
@ -359,6 +359,11 @@ void database::init_genesis(const genesis_state_type& genesis_state)
|
||||||
const auto& assets_by_symbol = get_index_type<asset_index>().indices().get<by_symbol>();
|
const auto& assets_by_symbol = get_index_type<asset_index>().indices().get<by_symbol>();
|
||||||
const auto get_asset_id = [&assets_by_symbol](const string& symbol) {
|
const auto get_asset_id = [&assets_by_symbol](const string& symbol) {
|
||||||
auto itr = assets_by_symbol.find(symbol);
|
auto itr = assets_by_symbol.find(symbol);
|
||||||
|
|
||||||
|
// TODO: This is temporary for handling BTS snapshot
|
||||||
|
if( symbol == "BTS" )
|
||||||
|
itr = assets_by_symbol.find(GRAPHENE_SYMBOL);
|
||||||
|
|
||||||
FC_ASSERT(itr != assets_by_symbol.end(),
|
FC_ASSERT(itr != assets_by_symbol.end(),
|
||||||
"Unable to find asset '${sym}'. Did you forget to add a record for it to initial_assets?",
|
"Unable to find asset '${sym}'. Did you forget to add a record for it to initial_assets?",
|
||||||
("sym", symbol));
|
("sym", symbol));
|
||||||
|
|
@ -396,6 +401,7 @@ void database::init_genesis(const genesis_state_type& genesis_state)
|
||||||
});
|
});
|
||||||
|
|
||||||
total_supplies[ 0 ] += collateral_rec.collateral;
|
total_supplies[ 0 ] += collateral_rec.collateral;
|
||||||
|
++collateral_holder_number;
|
||||||
}
|
}
|
||||||
|
|
||||||
bitasset_data_id = create<asset_bitasset_data_object>([&](asset_bitasset_data_object& b) {
|
bitasset_data_id = create<asset_bitasset_data_object>([&](asset_bitasset_data_object& b) {
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
Subproject commit d11b48a015e0c339cc20f739ef1f8a5b3c57b913
|
Subproject commit 088dadd12481e75829b83c098f3bc36b7e296ca0
|
||||||
Loading…
Reference in a new issue