Skip to content

Commit

Permalink
chore
Browse files Browse the repository at this point in the history
  • Loading branch information
tkxkd0159 committed May 7, 2024
1 parent 369647d commit 3aa2233
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions x/fbridge/types/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,16 +87,13 @@ func validateSendingState(state SendingState) error {
return errors.New("next sequence must be positive")

Check warning on line 87 in x/fbridge/types/genesis.go

View check run for this annotation

Codecov / codecov/patch

x/fbridge/types/genesis.go#L85-L87

Added lines #L85 - L87 were not covered by tests
}

seq := uint64(1)
if state.NextSeq-1 != uint64(len(state.SeqToBlocknum)) {
return errors.New("sequence to blocknum mapping is invalid")

Check warning on line 91 in x/fbridge/types/genesis.go

View check run for this annotation

Codecov / codecov/patch

x/fbridge/types/genesis.go#L90-L91

Added lines #L90 - L91 were not covered by tests
}
for _, v := range state.SeqToBlocknum {
if v.Blocknum < 1 || v.Seq < 1 {
return errors.New("blocknum and seq must be positive")

Check warning on line 95 in x/fbridge/types/genesis.go

View check run for this annotation

Codecov / codecov/patch

x/fbridge/types/genesis.go#L93-L95

Added lines #L93 - L95 were not covered by tests
}

if v.Seq != seq {
panic("sequence number is not in order")
}
seq++
}

return nil

Check warning on line 99 in x/fbridge/types/genesis.go

View check run for this annotation

Codecov / codecov/patch

x/fbridge/types/genesis.go#L99

Added line #L99 was not covered by tests
Expand Down

0 comments on commit 3aa2233

Please sign in to comment.