Skip to content

Commit

Permalink
fix random
Browse files Browse the repository at this point in the history
  • Loading branch information
vermocoin committed Sep 29, 2016
1 parent 23526e7 commit aa0a08d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
#include "txmempool.h"
#include "ui_interface.h"

#include <random>
#include <boost/random/mersenne_twister.hpp>
#include <boost/random/uniform_int.hpp>

using namespace std;
using namespace boost;
Expand Down Expand Up @@ -993,9 +994,9 @@ int64_t GetProofOfWorkReward(int64_t nFees, int nHeight)

int static generateMTRandom(unsigned int s, int range)
{
std::mt19937 gen(s);
std::uniform_int_distribution<> dist(1, range);
return dist(gen);
boost::mt19937 gen(s);
boost::uniform_int<> dist(1, range);
return dist(gen);
}
// miner's coin stake reward based on coin age spent (coin-days)
int64_t GetProofOfStakeReward(int64_t nCoinAge, int64_t nFees, int nHeight, uint256 prevHash)
Expand Down

0 comments on commit aa0a08d

Please sign in to comment.