use sync_head consistently in sync_block_headers (#1604)
* use sync_head consistently in sync_block_headers * rustfmt
This commit is contained in:
+4
-3
@@ -217,7 +217,7 @@ pub fn sync_block_headers(
|
||||
);
|
||||
}
|
||||
|
||||
let mut tip = batch.get_header_head()?;
|
||||
let mut sync_tip = batch.get_sync_head()?;
|
||||
|
||||
for header in headers {
|
||||
handle_block_header(header, ctx, batch)?;
|
||||
@@ -227,9 +227,10 @@ pub fn sync_block_headers(
|
||||
// and become the "most work" chain.
|
||||
// header_head and sync_head will diverge in this situation until we switch to
|
||||
// a single "most work" chain.
|
||||
tip = update_sync_head(header, ctx, batch)?;
|
||||
sync_tip = update_sync_head(header, ctx, batch)?;
|
||||
}
|
||||
Ok(tip)
|
||||
|
||||
Ok(sync_tip)
|
||||
}
|
||||
|
||||
fn handle_block_header(
|
||||
|
||||
Reference in New Issue
Block a user