提交 e2345ffa 编写于 作者: D Daniel Larimer

fix crashing

上级 eb8387ca
......@@ -93,10 +93,10 @@ void apply_eosio_newaccount(apply_context& context) {
b.balance = 0; //create.deposit.amount; TODO: make sure we credit this in @staked
});
context.mutable_db.create<staked_balance_object>([&]( staked_balance_object& sbo) {
const auto& sbo = context.mutable_db.create<staked_balance_object>([&]( staked_balance_object& sbo) {
sbo.owner_name = create.name;
sbo.stake_tokens( create.deposit.amount, context.mutable_db );
});
sbo.stake_tokens( create.deposit.amount, context.mutable_db );
db.create<bandwidth_usage_object>([&]( auto& bu ) { bu.owner = create.name; });
......
......@@ -17,9 +17,11 @@ void staked_balance_object::stake_tokens(share_type new_stake, chainbase::databa
sbo.staked_balance += new_stake;
});
/*
db.modify( db.get<dynamic_global_property_object>(), [&]( auto& dgpo ){
dgpo.total_staked_tokens += new_stake;
});
*/
propagate_votes(new_stake, db);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册