cryptonote: untangle dependency from miner to blockchain

It causes link errors at least on mac
This commit is contained in:
moneromooo-monero
2019-10-31 01:05:58 +00:00
parent bb04201505
commit d31024c2e1
6 changed files with 24 additions and 14 deletions
+3 -1
View File
@@ -663,7 +663,9 @@ namespace cryptonote
bl.minor_version = CURRENT_BLOCK_MINOR_VERSION;
bl.timestamp = 0;
bl.nonce = nonce;
miner::find_nonce_for_given_block(NULL, bl, 1, 0);
miner::find_nonce_for_given_block([](const cryptonote::block &b, uint64_t height, unsigned int threads, crypto::hash &hash){
return cryptonote::get_block_longhash(NULL, b, hash, height, threads);
}, bl, 1, 0);
bl.invalidate_hashes();
return true;
}