Skip to content

Commit b98e5e0

Browse files
authored
fix race condition (#3344)
1 parent 093c500 commit b98e5e0

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

chain/src/pipe.rs

+1-8
Original file line numberDiff line numberDiff line change
@@ -219,14 +219,7 @@ pub fn sync_block_headers(
219219
txhashset::header_extending(&mut ctx.header_pmmr, &mut ctx.batch, |ext, batch| {
220220
rewind_and_apply_header_fork(&last_header, ext, batch)?;
221221
Ok(())
222-
})?;
223-
224-
let header_head = ctx.batch.header_head()?;
225-
if has_more_work(last_header, &header_head) {
226-
update_header_head(&Tip::from_header(last_header), &mut ctx.batch)?;
227-
}
228-
229-
Ok(())
222+
})
230223
}
231224

232225
/// Process a block header. Update the header MMR and corresponding header_head if this header

0 commit comments

Comments
 (0)