Initializing random_pool along with other globals.

This commit is contained in:
clemahieu 2017-04-02 01:25:15 -05:00
commit 7a95b77e51
3 changed files with 4 additions and 4 deletions

View file

@ -73,8 +73,9 @@ std::string rai_live_genesis;
rai::account genesis_account;
std::string genesis_block;
rai::uint128_t genesis_amount;
CryptoPP::AutoSeededRandomPool random_pool;
};
ledger_constants const globals;
ledger_constants globals;
}
size_t constexpr rai::send_block::size;
@ -94,6 +95,7 @@ std::string const & rai::rai_live_genesis (globals.rai_live_genesis);
rai::account const & rai::genesis_account (globals.genesis_account);
std::string const & rai::genesis_block (globals.genesis_block);
rai::uint128_t const & rai::genesis_amount (globals.genesis_amount);
CryptoPP::AutoSeededRandomPool & rai::random_pool (globals.random_pool);
boost::filesystem::path rai::working_path ()
{

View file

@ -7,8 +7,6 @@
#include <liblmdb/lmdb.h>
CryptoPP::AutoSeededRandomPool rai::random_pool;
boost::filesystem::path rai::unique_path ()
{
auto result (working_path () / boost::filesystem::unique_path ());

View file

@ -20,7 +20,7 @@
namespace rai
{
extern CryptoPP::AutoSeededRandomPool random_pool;
extern CryptoPP::AutoSeededRandomPool & random_pool;
// We operate on streams of uint8_t by convention
using stream = std::basic_streambuf <uint8_t>;
using bufferstream = boost::iostreams::stream_buffer <boost::iostreams::basic_array_source <uint8_t>>;