Skip to content

Commit

Permalink
fix: allow for genesis.initial_height > 1
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelfig committed Oct 11, 2020
1 parent fedb533 commit c37fe33
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/cosmic-swingset/lib/block-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,9 @@ export default function makeBlockManager({
if (!deepEquals(currentActions, savedActions)) {
// We only handle the trivial case.
const restoreHeight = action.blockHeight - 1;
if (restoreHeight !== computedHeight) {
// We can reset from 0 to anything, since that's what happens
// when genesis.initial_height !== "0".
if (computedHeight !== 0 && restoreHeight !== computedHeight) {
// Keep throwing forever.
decohered = Error(
// TODO unimplemented
Expand Down

0 comments on commit c37fe33

Please sign in to comment.