From 8d3fd20db2b86ac48c70d2398f6a27398771dc99 Mon Sep 17 00:00:00 2001 From: Nathan Hourt Date: Wed, 8 Jul 2015 16:44:18 -0400 Subject: [PATCH] Progress #17: Fix account key genesis initialization --- libraries/chain/db_init.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/libraries/chain/db_init.cpp b/libraries/chain/db_init.cpp index d819d836..52027015 100644 --- a/libraries/chain/db_init.cpp +++ b/libraries/chain/db_init.cpp @@ -261,13 +261,11 @@ void database::init_genesis(const genesis_state_type& genesis_state) cop.name = account.name; cop.registrar = GRAPHENE_TEMP_ACCOUNT; cop.owner = authority(1, account.owner_key, 1); - if( account.owner_key != account.active_key ) - { - cop.active = authority(1, account.owner_key, 1); - } else { + if( account.owner_key != account.active_key && account.active_key != public_key_type() ) + cop.active = authority(1, account.active_key, 1); + else cop.active = cop.owner; - } - cop.options.memo_key = account.owner_key; + cop.options.memo_key = account.active_key; account_id_type account_id(apply_operation(genesis_eval_state, cop).get()); if( account.is_lifetime_member )