Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

trim-blocklog improvement (removing bad blocks and making blocks.log … #9085

Merged
merged 1 commit into from
May 13, 2020

Conversation

linhuang-blockone
Copy link
Contributor

…and blocks.index match

Change Description

This PR addresses #8940.
It enhances "eosio-blocklog trim-blocklog --last". Trimming last blocks goes through following steps:

  • Sanity check is performed on the block file.
  • If the block file is corrupt, last good block is searched and everything after the good block is discarded.
  • Block file and index file are checked if they agree with each other.
  • If index file has more entries, extra entries are discarded.
  • If index file has less entries, missing entries are generated from the block file and added to the index file.
  • Finally trimming is performed.

Consensus Changes

  • Consensus Changes

API Changes

  • API Changes

Documentation Additions

  • Documentation Additions

@linhuang-blockone linhuang-blockone merged commit a9ed6d6 into develop May 13, 2020
@brianjohnson5972 brianjohnson5972 deleted the trim-blocklog-improvement branch November 21, 2020 15:09
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants