Skip to content

Commit

Permalink
fix: reverse index read from chain stored
Browse files Browse the repository at this point in the history
  • Loading branch information
RafilxTenfen committed Jul 30, 2024
1 parent 7fdc39e commit f81da6a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/e2e/software_upgrade_e2e_signet_launch_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,10 @@ func (s *SoftwareUpgradeSignetLaunchTestSuite) TestUpgradeSignetLaunch() {
s.Equal(storedHeadersLen, oldHeadersStoredLen+lenHeadersInserted)

// ensure the headers were inserted at the end
for i := 0; i < storedHeadersLen-lenHeadersInserted; i++ {
for i := 0; i < lenHeadersInserted; i++ {
headerInsertedResp := btcHeadersInserted[i].ToResponse()
headerStoredResp := storedBtcHeadersResp[storedHeadersLen-(oldHeadersStoredLen+i)] // reverse
reversedStoredIndex := storedHeadersLen - (oldHeadersStoredLen + i + 1)
headerStoredResp := storedBtcHeadersResp[reversedStoredIndex] // reverse reading

s.EqualValues(headerInsertedResp, headerStoredResp)
}
Expand Down

0 comments on commit f81da6a

Please sign in to comment.