diff --git a/test/e2e/software_upgrade_e2e_signet_launch_test.go b/test/e2e/software_upgrade_e2e_signet_launch_test.go index b750ce5d7..99255220f 100644 --- a/test/e2e/software_upgrade_e2e_signet_launch_test.go +++ b/test/e2e/software_upgrade_e2e_signet_launch_test.go @@ -1,6 +1,8 @@ package e2e import ( + "sort" + "github.com/stretchr/testify/suite" "github.com/babylonlabs-io/babylon/app" @@ -76,4 +78,25 @@ func (s *SoftwareUpgradeSignetLaunchTestSuite) TestUpgradeSignetLaunch() { s.EqualValues(headerInserted.Header.MarshalHex(), headerStoredResp.HeaderHex) } + + oldFPsLen := 0 // it should not have any FP + fpsFromNode := n.QueryFinalityProviders() + bbnApp := app.NewTmpBabylonApp() + + fpsInserted, err := v1.LoadSignedFPsFromData(bbnApp.AppCodec(), bbnApp.TxConfig().TxJSONDecoder()) + s.NoError(err) + s.Equal(len(fpsInserted), len(fpsFromNode)+oldFPsLen) + + // sorts all the FPs from node to match the ones from loaded string json + sort.Slice(fpsFromNode, func(i, j int) bool { + return fpsFromNode[i].Addr > fpsFromNode[j].Addr + }) + + for i, fpInserted := range fpsInserted { + fpFromKeeper := fpsFromNode[i] + s.EqualValues(fpFromKeeper.Addr, fpInserted.Addr) + s.EqualValues(fpFromKeeper.Description, fpInserted.Description) + s.EqualValues(fpFromKeeper.Commission.String(), fpInserted.Commission.String()) + s.EqualValues(fpFromKeeper.Pop.String(), fpInserted.Pop.String()) + } } diff --git a/test/e2e/upgrades/signet-launch.json b/test/e2e/upgrades/signet-launch.json index f1be8ba79..820686a2f 100644 --- a/test/e2e/upgrades/signet-launch.json +++ b/test/e2e/upgrades/signet-launch.json @@ -6,7 +6,7 @@ "plan": { "name": "signet-launch", "time": "0001-01-01T00:00:00Z", - "height": "23", + "height": "21", "info": "Msg info", "upgraded_client_state": null }