aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/core_rpc_server.cpp
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2019-11-01 17:03:58 +0200
committerRiccardo Spagni <ric@spagni.net>2019-11-01 17:03:58 +0200
commit8cc7d5b6c0c611dd03eba21c9cc7a9a043fa7b04 (patch)
treea2ef779b7187e93ed6d0948abc845c6c7718c197 /src/rpc/core_rpc_server.cpp
parentMerge pull request #6064 (diff)
parentcryptonote: untangle dependency from miner to blockchain (diff)
downloadmonero-8cc7d5b6c0c611dd03eba21c9cc7a9a043fa7b04.tar.xz
Merge pull request #6066
d31024c2e cryptonote: untangle dependency from miner to blockchain (moneromooo-monero)
Diffstat (limited to 'src/rpc/core_rpc_server.cpp')
-rw-r--r--src/rpc/core_rpc_server.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/rpc/core_rpc_server.cpp b/src/rpc/core_rpc_server.cpp
index 8c08b81b0..9117b5b3a 100644
--- a/src/rpc/core_rpc_server.cpp
+++ b/src/rpc/core_rpc_server.cpp
@@ -1833,7 +1833,9 @@ namespace cryptonote
return false;
}
b.nonce = req.starting_nonce;
- miner::find_nonce_for_given_block(&(m_core.get_blockchain_storage()), b, template_res.difficulty, template_res.height);
+ miner::find_nonce_for_given_block([this](const cryptonote::block &b, uint64_t height, unsigned int threads, crypto::hash &hash) {
+ return cryptonote::get_block_longhash(&(m_core.get_blockchain_storage()), b, hash, height, threads);
+ }, b, template_res.difficulty, template_res.height);
submit_req.front() = string_tools::buff_to_hex_nodelimer(block_to_blob(b));
r = on_submitblock(submit_req, submit_res, error_resp, ctx);