RandomX integration

Support RandomX PoW algorithm
This commit is contained in:
Howard Chu 2019-04-23 20:32:27 +01:00
parent cb6f96b9d1
commit 81c2ad6d5b
No known key found for this signature in database
GPG key ID: FD2A70B44AB11BA7
24 changed files with 610 additions and 49 deletions

View file

@ -186,7 +186,7 @@ bool test_generator::construct_block(cryptonote::block& blk, uint64_t height, co
// Nonce search...
blk.nonce = 0;
while (!miner::find_nonce_for_given_block(blk, get_test_difficulty(hf_ver), height))
while (!miner::find_nonce_for_given_block(NULL, blk, get_test_difficulty(hf_ver), height))
blk.timestamp++;
add_block(blk, txs_weight, block_weights, already_generated_coins, hf_ver ? hf_ver.get() : 1);
@ -797,7 +797,7 @@ void fill_tx_sources_and_destinations(const std::vector<test_event_entry>& event
void fill_nonce(cryptonote::block& blk, const difficulty_type& diffic, uint64_t height)
{
blk.nonce = 0;
while (!miner::find_nonce_for_given_block(blk, diffic, height))
while (!miner::find_nonce_for_given_block(NULL, blk, diffic, height))
blk.timestamp++;
}