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

adds high performance random generator #59

Merged
merged 1 commit into from
Jul 3, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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