Skip to content

Commit

Permalink
fix e2e
Browse files Browse the repository at this point in the history
  • Loading branch information
gitferry committed Aug 1, 2024
1 parent 777df61 commit b038e66
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions itest/test_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ func StartManagerWithFinalityProvider(t *testing.T, n int) (*TestManager, []*btc

var btcPks []*btcec.PublicKey
for i := 0; i < n; i++ {
fpData := genTestFinalityProviderData(t)
fpData := genTestFinalityProviderData(t, tm.CovBBNClient.GetKeyAddress())
btcPubKey := bbntypes.NewBIP340PubKeyFromBTCPK(fpData.BtcKey)
_, err := tm.CovBBNClient.RegisterFinalityProvider(
btcPubKey,
Expand Down Expand Up @@ -160,15 +160,14 @@ func StartManagerWithFinalityProvider(t *testing.T, n int) (*TestManager, []*btc
return tm, btcPks
}

func genTestFinalityProviderData(t *testing.T) *testFinalityProviderData {
func genTestFinalityProviderData(t *testing.T, babylonAddr sdk.AccAddress) *testFinalityProviderData {
finalityProviderEOTSPrivKey, err := btcec.NewPrivateKey()
require.NoError(t, err)
finalityProviderBabylonAccAddress := datagen.GenRandomAccount().GetAddress()
pop, err := bstypes.NewPoPBTC(finalityProviderBabylonAccAddress, finalityProviderEOTSPrivKey)
pop, err := bstypes.NewPoPBTC(babylonAddr, finalityProviderEOTSPrivKey)
require.NoError(t, err)

return &testFinalityProviderData{
BabylonAddress: finalityProviderBabylonAccAddress,
BabylonAddress: babylonAddr,
BtcPrivKey: finalityProviderEOTSPrivKey,
BtcKey: finalityProviderEOTSPrivKey.PubKey(),
PoP: pop,
Expand Down

0 comments on commit b038e66

Please sign in to comment.