mirror of
https://github.com/mimblewimble/grin.git
synced 2025-02-01 17:01:09 +03:00
parent
2259c18dd6
commit
497d66e482
1 changed files with 4 additions and 7 deletions
|
@ -26,8 +26,8 @@ use common::types::StratumServerConfig;
|
||||||
use core::core::hash::{Hash, Hashed};
|
use core::core::hash::{Hash, Hashed};
|
||||||
use core::core::verifier_cache::VerifierCache;
|
use core::core::verifier_cache::VerifierCache;
|
||||||
use core::core::{Block, BlockHeader};
|
use core::core::{Block, BlockHeader};
|
||||||
|
use core::global;
|
||||||
use core::pow::PoWContext;
|
use core::pow::PoWContext;
|
||||||
use core::{consensus, global};
|
|
||||||
use mining::mine_block;
|
use mining::mine_block;
|
||||||
use pool;
|
use pool;
|
||||||
use util::LOGGER;
|
use util::LOGGER;
|
||||||
|
@ -96,12 +96,9 @@ impl Miner {
|
||||||
let mut iter_count = 0;
|
let mut iter_count = 0;
|
||||||
|
|
||||||
while head.hash() == *latest_hash && Utc::now().timestamp() < deadline {
|
while head.hash() == *latest_hash && Utc::now().timestamp() < deadline {
|
||||||
let mut ctx = global::create_pow_context::<u32>(
|
let mut ctx =
|
||||||
global::min_sizeshift(),
|
global::create_pow_context::<u32>(global::min_sizeshift(), global::proofsize(), 10)
|
||||||
global::proofsize(),
|
.unwrap();
|
||||||
consensus::EASINESS,
|
|
||||||
10,
|
|
||||||
).unwrap();
|
|
||||||
ctx.set_header_nonce(b.header.pre_pow(), None, true)
|
ctx.set_header_nonce(b.header.pre_pow(), None, true)
|
||||||
.unwrap();
|
.unwrap();
|
||||||
if let Ok(proofs) = ctx.find_cycles() {
|
if let Ok(proofs) = ctx.find_cycles() {
|
||||||
|
|
Loading…
Reference in a new issue