From ebc6ce44f407fab07955fc230f4cab59742fd959 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Thu, 31 Oct 2019 01:05:58 +0000 Subject: cryptonote: untangle dependency from miner to blockchain It causes link errors at least on mac --- src/cryptonote_core/cryptonote_tx_utils.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/cryptonote_core/cryptonote_tx_utils.cpp') diff --git a/src/cryptonote_core/cryptonote_tx_utils.cpp b/src/cryptonote_core/cryptonote_tx_utils.cpp index 3e1b4e97f..f50fc61a5 100644 --- a/src/cryptonote_core/cryptonote_tx_utils.cpp +++ b/src/cryptonote_core/cryptonote_tx_utils.cpp @@ -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; } -- cgit v1.2.3