Skip to content

Commit

Permalink
Merge pull request #89 from boscore/feature/bug-fix-pbft-validation
Browse files Browse the repository at this point in the history
sort view change and producer vector before intersection.
  • Loading branch information
Thaipanda authored Apr 30, 2019
2 parents d3e4f5f + d8cd42e commit 6c65226
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libraries/chain/pbft_database.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -786,6 +786,9 @@ namespace eosio {
}

vector<public_key_type> intersection;

std::sort(lib_producers.begin(),lib_producers.end());
std::sort(view_change_producers.begin(),view_change_producers.end());
std::set_intersection(lib_producers.begin(),lib_producers.end(),
view_change_producers.begin(),view_change_producers.end(),
back_inserter(intersection));
Expand Down

0 comments on commit 6c65226

Please sign in to comment.