Merge branch 'bug/556-split-vote_ids' into 'develop'
#556 split vote ids fix See merge request PBSA/peerplays!243
This commit is contained in:
commit
c055445e6a
2 changed files with 3 additions and 3 deletions
|
|
@ -2283,7 +2283,7 @@ void database::perform_son_tasks()
|
|||
// Add vote_ids for HIVE and ETHEREUM to all existing SONs
|
||||
const auto &all_sons = get_index_type<son_index>().indices().get<by_id>();
|
||||
for (const son_object &son : all_sons) {
|
||||
vote_id_type existing_vote_id_bitcoin;
|
||||
const auto existing_vote_id_bitcoin = son.get_bitcoin_vote_id();
|
||||
vote_id_type new_vote_id_hive;
|
||||
vote_id_type new_vote_id_eth;
|
||||
|
||||
|
|
@ -2300,7 +2300,7 @@ void database::perform_son_tasks()
|
|||
// Duplicate all votes from bitcoin to hive
|
||||
const auto &all_accounts = get_index_type<account_index>().indices().get<by_id>();
|
||||
for (const auto &account : all_accounts) {
|
||||
if (account.options.votes.count(existing_vote_id_bitcoin) != 0) {
|
||||
if (existing_vote_id_bitcoin.valid() && account.options.votes.count(*existing_vote_id_bitcoin) != 0) {
|
||||
modify(account, [new_vote_id_hive](account_object &a) {
|
||||
a.options.votes.insert(new_vote_id_hive);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ public:
|
|||
{
|
||||
fixture_.init_nathan();
|
||||
fixture_.generate_blocks(HARDFORK_SON_FOR_ETHEREUM_TIME);
|
||||
fixture_.generate_block();
|
||||
fixture_.generate_maintenance_block();
|
||||
}
|
||||
|
||||
void create_son(const std::string& account_name, const std::string& son_url,
|
||||
|
|
|
|||
Loading…
Reference in a new issue