Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Commit

Permalink
Merge pull request #59 from rozgo/master
Browse files Browse the repository at this point in the history
adds high performance random generator
  • Loading branch information
nathanielhourt authored Jul 3, 2017
2 parents 02d219d + 78696ca commit 568f439
Show file tree
Hide file tree
Showing 8 changed files with 52 additions and 4,002 deletions.
6 changes: 2 additions & 4 deletions libraries/chain/chain_controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@
#include <eos/types/native.hpp>
#include <eos/types/generated.hpp>

#include <eos/utilities/randutils.hpp>
#include <eos/utilities/pcg-random/pcg_random.hpp>
#include <eos/utilities/rand.hpp>

#include <fc/smart_ref_impl.hpp>
#include <fc/uint128.hpp>
Expand Down Expand Up @@ -881,8 +880,7 @@ ProducerRound chain_controller::calculate_next_round(const signed_block& next_bl
"Unexpected round changes in new block header",
("expected changes", changes)("block changes", next_block.producer_changes));

randutils::seed_seq_fe<1> seed{next_block.timestamp.sec_since_epoch()};
randutils::random_generator<pcg32_fast> rng(seed);
utilities::rand::random rng(next_block.timestamp.sec_since_epoch());
rng.shuffle(schedule);
return schedule;
}
Expand Down

This file was deleted.

Loading

0 comments on commit 568f439

Please sign in to comment.