Rewind head and header_head consistently. (#2918)
* maintain header_head as distinctly separate from head * cleanup corrupted storage log msg * simplify process_header and check_header_known * remember to commit the batch when successfully processing a header... * rework sync_block_headers for consistency with process_block_header * cleanup unrelated code * fix pool tests * cleanup chain tests * cleanup chain tests (reuse helpers more) * cleanup - head not header on an extension shortcircuit "rewind and apply fork" for headers if next header
This commit is contained in:
@@ -58,7 +58,8 @@ impl ChainAdapter {
|
||||
let batch = s.batch().unwrap();
|
||||
|
||||
batch.save_block_header(header).unwrap();
|
||||
batch.save_head(&tip).unwrap();
|
||||
batch.save_body_head(&tip).unwrap();
|
||||
batch.save_header_head(&tip).unwrap();
|
||||
|
||||
// Retrieve previous block_sums from the db.
|
||||
let prev_sums = if let Ok(prev_sums) = batch.get_block_sums(&tip.prev_block_h) {
|
||||
|
||||
Reference in New Issue
Block a user