mirror of
https://github.com/mimblewimble/grin.git
synced 2025-01-20 19:11:08 +03:00
fix race condition (#3344)
This commit is contained in:
parent
093c500fed
commit
b98e5e06a6
1 changed files with 1 additions and 8 deletions
|
@ -219,14 +219,7 @@ pub fn sync_block_headers(
|
|||
txhashset::header_extending(&mut ctx.header_pmmr, &mut ctx.batch, |ext, batch| {
|
||||
rewind_and_apply_header_fork(&last_header, ext, batch)?;
|
||||
Ok(())
|
||||
})?;
|
||||
|
||||
let header_head = ctx.batch.header_head()?;
|
||||
if has_more_work(last_header, &header_head) {
|
||||
update_header_head(&Tip::from_header(last_header), &mut ctx.batch)?;
|
||||
}
|
||||
|
||||
Ok(())
|
||||
})
|
||||
}
|
||||
|
||||
/// Process a block header. Update the header MMR and corresponding header_head if this header
|
||||
|
|
Loading…
Reference in a new issue