From a1c34b8854b8a9ae9084f498ff4439fa51e1c80b Mon Sep 17 00:00:00 2001 From: Mauro Lacy Date: Mon, 18 Nov 2024 16:36:09 +0100 Subject: [PATCH] Enable trace for tests --- demo/app/test_helpers.go | 1 + x/babylon/keeper/wasm.go | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/demo/app/test_helpers.go b/demo/app/test_helpers.go index 7449e0f..6e4e084 100644 --- a/demo/app/test_helpers.go +++ b/demo/app/test_helpers.go @@ -66,6 +66,7 @@ func setup(t testing.TB, chainID string, withGenesis bool, invCheckPeriod uint, appOptions := make(simsutils.AppOptionsMap, 0) appOptions[flags.FlagHome] = nodeHome // ensure unique folder + appOptions[server.FlagTrace] = true appOptions[server.FlagInvCheckPeriod] = invCheckPeriod app := NewConsumerApp(log.NewNopLogger(), db, nil, true, appOptions, opts, bam.SetChainID(chainID), bam.SetSnapshot(snapshotStore, snapshottypes.SnapshotOptions{KeepRecent: 2})) if withGenesis { diff --git a/x/babylon/keeper/wasm.go b/x/babylon/keeper/wasm.go index 20561ad..60bad02 100644 --- a/x/babylon/keeper/wasm.go +++ b/x/babylon/keeper/wasm.go @@ -4,6 +4,7 @@ import ( "context" "encoding/hex" "encoding/json" + "fmt" errorsmod "cosmossdk.io/errors" "github.com/babylonlabs-io/babylon-sdk/x/babylon/contract" @@ -113,6 +114,6 @@ func (k Keeper) doSudoCall(ctx sdk.Context, contractAddr sdk.AccAddress, msg con return errorsmod.Wrap(err, "marshal sudo msg") } resp, err := k.wasm.Sudo(ctx, contractAddr, bz) - k.Logger(ctx).Debug("response of sudo call %v to contract %s: %v", bz, contractAddr.String(), resp) + k.Logger(ctx).Debug(fmt.Sprintf("response of sudo call %v to contract %s: %v", bz, contractAddr.String(), resp)) return err }