Skip to content

Commit

Permalink
fix: reverse from chain stored
Browse files Browse the repository at this point in the history
  • Loading branch information
RafilxTenfen committed Jul 30, 2024
1 parent a8cbda5 commit 7fdc39e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test/e2e/software_upgrade_e2e_signet_launch_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,14 @@ func (s *SoftwareUpgradeSignetLaunchTestSuite) TestUpgradeSignetLaunch() {
oldHeadersStoredLen := 1 // only block zero is set by default in genesis for e2e test

storedBtcHeadersResp := n.QueryBtcLightClientMainchain()
newHeadersLen := len(storedBtcHeadersResp)
s.Equal(newHeadersLen, oldHeadersStoredLen+lenHeadersInserted)
storedHeadersLen := len(storedBtcHeadersResp)
s.Equal(storedHeadersLen, oldHeadersStoredLen+lenHeadersInserted)

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

s.EqualValues(headerInserted.ToResponse(), headerStoredResp)
s.EqualValues(headerInsertedResp, headerStoredResp)
}
}

0 comments on commit 7fdc39e

Please sign in to comment.