Progress #31: Fix genesis initialization
This commit is contained in:
parent
ed7d485df3
commit
18b163b99e
2 changed files with 6 additions and 1 deletions
|
|
@ -153,6 +153,7 @@ void database::init_genesis(const genesis_allocation& initial_allocation)
|
||||||
});
|
});
|
||||||
const account_object& genesis_account =
|
const account_object& genesis_account =
|
||||||
create<account_object>( [&](account_object& n) {
|
create<account_object>( [&](account_object& n) {
|
||||||
|
n.membership_expiration_date = time_point_sec::maximum();
|
||||||
n.name = "genesis";
|
n.name = "genesis";
|
||||||
n.owner.add_authority(genesis_key.get_id(), 1);
|
n.owner.add_authority(genesis_key.get_id(), 1);
|
||||||
n.owner.weight_threshold = 1;
|
n.owner.weight_threshold = 1;
|
||||||
|
|
@ -174,6 +175,10 @@ void database::init_genesis(const genesis_allocation& initial_allocation)
|
||||||
const account_object& delegate_account =
|
const account_object& delegate_account =
|
||||||
create<account_object>( [&](account_object& a) {
|
create<account_object>( [&](account_object& a) {
|
||||||
a.active = a.owner = genesis_account.owner;
|
a.active = a.owner = genesis_account.owner;
|
||||||
|
a.referrer = account_id_type(i);
|
||||||
|
a.registrar = account_id_type(i);
|
||||||
|
a.lifetime_referrer = account_id_type(i);
|
||||||
|
a.membership_expiration_date = fc::time_point_sec::maximum();
|
||||||
a.name = string("init") + fc::to_string(i);
|
a.name = string("init") + fc::to_string(i);
|
||||||
a.statistics = stats_obj.id;
|
a.statistics = stats_obj.id;
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -184,7 +184,7 @@ namespace graphene { namespace chain {
|
||||||
/// @return true if this is a lifetime member account; false otherwise.
|
/// @return true if this is a lifetime member account; false otherwise.
|
||||||
bool is_lifetime_member()const
|
bool is_lifetime_member()const
|
||||||
{
|
{
|
||||||
return get_id() == referrer;
|
return membership_expiration_date == time_point_sec::maximum();
|
||||||
}
|
}
|
||||||
/// @return true if this is a basic account; false otherwise.
|
/// @return true if this is a basic account; false otherwise.
|
||||||
bool is_basic_account(time_point_sec now)const
|
bool is_basic_account(time_point_sec now)const
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue