From 5d36258f0c818276a11d17e07eee848e1b2843a5 Mon Sep 17 00:00:00 2001 From: Sandip Patel Date: Thu, 31 Oct 2019 15:02:05 +0530 Subject: [PATCH 1/3] case 1: Fixed last voting time issue --- libraries/chain/include/graphene/chain/protocol/account.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/chain/include/graphene/chain/protocol/account.hpp b/libraries/chain/include/graphene/chain/protocol/account.hpp index a0e43ad0..6a8aa20c 100644 --- a/libraries/chain/include/graphene/chain/protocol/account.hpp +++ b/libraries/chain/include/graphene/chain/protocol/account.hpp @@ -296,7 +296,7 @@ FC_REFLECT( graphene::chain::account_create_operation, (name)(owner)(active)(options)(extensions) ) -FC_REFLECT(graphene::chain::account_update_operation::ext, (null_ext)(owner_special_authority)(active_special_authority) ) +FC_REFLECT(graphene::chain::account_update_operation::ext, (null_ext)(owner_special_authority)(active_special_authority)(update_last_voting_time) ) FC_REFLECT( graphene::chain::account_update_operation, (fee)(account)(owner)(active)(new_options)(extensions) ) From e7f65c676047ac58fea8297ed68f9f644342e896 Mon Sep 17 00:00:00 2001 From: Sandip Patel Date: Mon, 2 Sep 2019 16:51:45 +0530 Subject: [PATCH 2/3] get_account bug fixed --- libraries/wallet/wallet.cpp | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/libraries/wallet/wallet.cpp b/libraries/wallet/wallet.cpp index 8d2ae75f..66034d6e 100644 --- a/libraries/wallet/wallet.cpp +++ b/libraries/wallet/wallet.cpp @@ -717,8 +717,6 @@ public: } account_object get_account(account_id_type id) const { - if( _wallet.my_accounts.get().count(id) ) - return *_wallet.my_accounts.get().find(id); auto rec = _remote_db->get_accounts({id}).front(); FC_ASSERT(rec); return *rec; @@ -732,19 +730,6 @@ public: // It's an ID return get_account(*id); } else { - // It's a name - if( _wallet.my_accounts.get().count(account_name_or_id) ) - { - auto local_account = *_wallet.my_accounts.get().find(account_name_or_id); - auto blockchain_account = _remote_db->lookup_account_names({account_name_or_id}).front(); - FC_ASSERT( blockchain_account ); - if (local_account.id != blockchain_account->id) - elog("my account id ${id} different from blockchain id ${id2}", ("id", local_account.id)("id2", blockchain_account->id)); - if (local_account.name != blockchain_account->name) - elog("my account name ${id} different from blockchain name ${id2}", ("id", local_account.name)("id2", blockchain_account->name)); - - return *_wallet.my_accounts.get().find(account_name_or_id); - } auto rec = _remote_db->lookup_account_names({account_name_or_id}).front(); FC_ASSERT( rec && rec->name == account_name_or_id ); return *rec; From fd8659caafaa26a444c9a20a22dd51be6a0b07ea Mon Sep 17 00:00:00 2001 From: Sandip Patel Date: Thu, 31 Oct 2019 19:01:50 +0530 Subject: [PATCH 3/3] Fixed flag issue --- libraries/chain/account_evaluator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/chain/account_evaluator.cpp b/libraries/chain/account_evaluator.cpp index 3185c456..96429304 100644 --- a/libraries/chain/account_evaluator.cpp +++ b/libraries/chain/account_evaluator.cpp @@ -287,7 +287,7 @@ void_result account_update_evaluator::do_apply( const account_update_operation& fc::optional< bool > flag = o.extensions.value.update_last_voting_time; if((o.new_options->votes != acnt->options.votes || o.new_options->voting_account != acnt->options.voting_account) || - flag) + (flag.valid() && *flag)) aso.last_vote_time = d.head_block_time(); } ); }