mirror of
https://github.com/mimblewimble/grin.git
synced 2025-05-11 03:31:15 +03:00
servers: fix possible deadlock (#3337)
This commit is contained in:
parent
e7d2c71ca6
commit
450d235358
1 changed files with 3 additions and 2 deletions
|
@ -342,10 +342,11 @@ impl Handler {
|
|||
bh.pow.write_pre_pow(&mut writer).unwrap();
|
||||
}
|
||||
let pre_pow = header_buf.to_hex();
|
||||
let current_state = self.current_state.read();
|
||||
let job_template = JobTemplate {
|
||||
height: bh.height,
|
||||
job_id: (self.current_state.read().current_block_versions.len() - 1) as u64,
|
||||
difficulty: self.current_state.read().minimum_share_difficulty,
|
||||
job_id: (current_state.current_block_versions.len() - 1) as u64,
|
||||
difficulty: current_state.minimum_share_difficulty,
|
||||
pre_pow,
|
||||
};
|
||||
return job_template;
|
||||
|
|
Loading…
Add table
Reference in a new issue