Skip to content

Commit

Permalink
- When the full snapshot contains more msdiff than necessary we apply…
Browse files Browse the repository at this point in the history
… 1 msdiff too much, so the ledger index does not match the target index at the end. (#1620)
  • Loading branch information
alexsporn authored Jul 13, 2022
1 parent 66b6479 commit 17f6bc4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ All notable changes to this project will be documented in this file.

## [2.0.0-alpha.25] - 13.07.2022

### Fixed
- Fixed `final ledger index does not match target index` (#1620)

### Changed
- Removed `app.enablePlugins` and `app.disablePlugins` and replaced them with plugin-specific `enabled` settings (#1617)

Expand Down
2 changes: 1 addition & 1 deletion pkg/snapshot/snapshot_file.go
Original file line number Diff line number Diff line change
Expand Up @@ -1240,7 +1240,7 @@ func StreamFullSnapshotDataFrom(

// we do not consume milestone diffs that are below the target milestone index.
// these additional milestone diffs are only used to get the protocol parameter updates.
if msDiff.Milestone.Index < fullHeader.TargetMilestoneIndex {
if msDiff.Milestone.Index <= fullHeader.TargetMilestoneIndex {
// we can break the loop here since we are walking backwards.
// we also need to jump to the end of the milestone diffs.
reader.Seek(msDiffsLength-msDiffsParsedLength, io.SeekCurrent)
Expand Down

0 comments on commit 17f6bc4

Please sign in to comment.