Skip to content

Commit

Permalink
fix fuzz/e2e
Browse files Browse the repository at this point in the history
  • Loading branch information
SebastianElvis committed Sep 10, 2024
1 parent 17ee332 commit 9454e89
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 5 deletions.
5 changes: 5 additions & 0 deletions app/e2e_include_upgrades.go → app/e2e_code.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
//go:build e2e

// This file contains code specific to end-to-end (e2e) testing for the Babylon application.
// It includes the signet upgrade and enables integration.

package app

import (
"github.com/babylonlabs-io/babylon/app/upgrades/signetlaunch"
zctypes "github.com/babylonlabs-io/babylon/x/zonecaching/types"
)

// init is used to include signet upgrade used for e2e testing
// this file should be removed once the upgrade testing with signet ends.
func init() {
Upgrades = append(Upgrades, signetlaunch.Upgrade)
zctypes.EnableIntegration = true
}
8 changes: 6 additions & 2 deletions x/zoneconcierge/keeper/keeper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,16 @@ import (
"context"
"math/rand"

ibctmtypes "github.com/cosmos/ibc-go/v8/modules/light-clients/07-tendermint"

"github.com/babylonlabs-io/babylon/testutil/datagen"
zckeeper "github.com/babylonlabs-io/babylon/x/zoneconcierge/keeper"
zctypes "github.com/babylonlabs-io/babylon/x/zoneconcierge/types"
ibctmtypes "github.com/cosmos/ibc-go/v8/modules/light-clients/07-tendermint"
)

func init() {
zctypes.EnableIntegration = true
}

// SimulateNewHeaders generates a non-zero number of canonical headers
func SimulateNewHeaders(ctx context.Context, r *rand.Rand, k *zckeeper.Keeper, consumerID string, startHeight uint64, numHeaders uint64) []*ibctmtypes.Header {
headers := []*ibctmtypes.Header{}
Expand Down
9 changes: 6 additions & 3 deletions x/zoneconcierge/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ package zoneconcierge

import (
"context"
"cosmossdk.io/core/appmodule"
"encoding/json"
"fmt"

"cosmossdk.io/core/appmodule"

"github.com/grpc-ecosystem/grpc-gateway/runtime"
"github.com/spf13/cobra"

Expand Down Expand Up @@ -119,8 +120,10 @@ func (AppModule) QuerierRoute() string { return types.RouterKey }

// RegisterServices registers a gRPC query service to respond to the module-specific gRPC queries
func (am AppModule) RegisterServices(cfg module.Configurator) {
types.RegisterMsgServer(cfg.MsgServer(), keeper.NewMsgServerImpl(am.keeper))
types.RegisterQueryServer(cfg.QueryServer(), am.keeper)
if types.EnableIntegration {
types.RegisterMsgServer(cfg.MsgServer(), keeper.NewMsgServerImpl(am.keeper))
types.RegisterQueryServer(cfg.QueryServer(), am.keeper)
}
}

// RegisterInvariants registers the invariants of the module. If an invariant deviates from its predicted value, the InvariantRegistry triggers appropriate logic (most often the chain will be halted)
Expand Down
4 changes: 4 additions & 0 deletions x/zoneconcierge/types/btc_timestamp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ import (
"github.com/babylonlabs-io/babylon/x/zoneconcierge/types"
)

func init() {
types.EnableIntegration = true
}

func signBLSWithBitmap(blsSKs []bls12381.PrivateKey, bm bitmap.Bitmap, msg []byte) (bls12381.Signature, error) {
sigs := []bls12381.Signature{}
for i := 0; i < len(blsSKs); i++ {
Expand Down

0 comments on commit 9454e89

Please sign in to comment.