diff options
| author | Riccardo Spagni <ric@spagni.net> | 2019-11-02 17:30:09 +0200 |
|---|---|---|
| committer | Riccardo Spagni <ric@spagni.net> | 2019-11-02 17:30:09 +0200 |
| commit | da31077bed2133db46c05f7030aefdb6d88d0d3b (patch) | |
| tree | 54318a94f08b1aa7e1941ec980ce9af730956973 /tests/core_tests | |
| parent | e41fc4bfc8c37d45e39152042f53e40e48632fa4 (diff) | |
| parent | ebc6ce44f407fab07955fc230f4cab59742fd959 (diff) | |
| download | monzero-core-da31077bed2133db46c05f7030aefdb6d88d0d3b.tar.gz monzero-core-da31077bed2133db46c05f7030aefdb6d88d0d3b.tar.xz monzero-core-da31077bed2133db46c05f7030aefdb6d88d0d3b.zip | |
Merge pull request #6047
ebc6ce44f cryptonote: untangle dependency from miner to blockchain (moneromooo-monero)
Diffstat (limited to 'tests/core_tests')
| -rw-r--r-- | tests/core_tests/chaingen.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/core_tests/chaingen.cpp b/tests/core_tests/chaingen.cpp index 3f2984288..35e449e10 100644 --- a/tests/core_tests/chaingen.cpp +++ b/tests/core_tests/chaingen.cpp @@ -186,7 +186,9 @@ bool test_generator::construct_block(cryptonote::block& blk, uint64_t height, co // Nonce search... blk.nonce = 0; - while (!miner::find_nonce_for_given_block(NULL, blk, get_test_difficulty(hf_ver), height)) + while (!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); + }, 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 +799,9 @@ 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(NULL, blk, diffic, height)) + while (!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); + }, blk, diffic, height)) blk.timestamp++; } |
