diff --git a/testutil/keeper/crosschain.go b/testutil/keeper/crosschain.go index 11ffcb9736..dc3aabcea1 100644 --- a/testutil/keeper/crosschain.go +++ b/testutil/keeper/crosschain.go @@ -64,7 +64,7 @@ func CrosschainKeeperWithMocks( // Create zeta keepers authorityKeeperTmp := initAuthorityKeeper(cdc, db, stateStore) - lightclientKeeperTmp := initLightclientKeeper(cdc, db, stateStore) + lightclientKeeperTmp := initLightclientKeeper(cdc, db, stateStore, authorityKeeperTmp) observerKeeperTmp := initObserverKeeper( cdc, db, diff --git a/testutil/keeper/emissions.go b/testutil/keeper/emissions.go index fd97ceaefb..a799b94edb 100644 --- a/testutil/keeper/emissions.go +++ b/testutil/keeper/emissions.go @@ -41,6 +41,8 @@ func EmissionKeeperWithMockOptions( // Create regular keepers sdkKeepers := NewSDKKeepers(cdc, db, stateStore) + authorityKeeper := initAuthorityKeeper(cdc, db, stateStore) + // Create zeta keepers observerKeeperTmp := initObserverKeeper( cdc, @@ -49,8 +51,8 @@ func EmissionKeeperWithMockOptions( sdkKeepers.StakingKeeper, sdkKeepers.SlashingKeeper, sdkKeepers.ParamsKeeper, - initAuthorityKeeper(cdc, db, stateStore), - initLightclientKeeper(cdc, db, stateStore), + authorityKeeper, + initLightclientKeeper(cdc, db, stateStore, authorityKeeper), ) zetaKeepers := ZetaKeepers{ diff --git a/testutil/keeper/fungible.go b/testutil/keeper/fungible.go index 70bb05a8ec..0384c97611 100644 --- a/testutil/keeper/fungible.go +++ b/testutil/keeper/fungible.go @@ -94,6 +94,7 @@ func FungibleKeeperWithMocks(t testing.TB, mockOptions FungibleMockOptions) (*ke cdc, db, stateStore, + authorityKeeperTmp, ) // Create observer keeper diff --git a/x/crosschain/types/tx_body_verification.go b/x/crosschain/types/tx_body_verification.go index fbd06d63f6..bc60cd6f1a 100644 --- a/x/crosschain/types/tx_body_verification.go +++ b/x/crosschain/types/tx_body_verification.go @@ -23,9 +23,8 @@ func VerifyInTxBody( // verify message against transaction body if chains.IsEVMChain(msg.ChainId) { return VerifyInTxBodyEVM(msg, txBytes, chainParams, tss) - } else { - return fmt.Errorf("cannot verify inTx body for chain %d", msg.ChainId) } + return fmt.Errorf("cannot verify inTx body for chain %d", msg.ChainId) } // VerifyInTxBodyEVM validates the chain id and connector contract address for Zeta, ERC20 custody contract address for ERC20 and TSS address for Gas. @@ -81,9 +80,8 @@ func VerifyOutTxBody(msg MsgAddToOutTxTracker, txBytes []byte, tss observertypes return VerifyOutTxBodyEVM(msg, txBytes, tss.Eth) } else if chains.IsBitcoinChain(msg.ChainId) { return VerifyOutTxBodyBTC(msg, txBytes, tss.Btc) - } else { - return fmt.Errorf("cannot verify outTx body for chain %d", msg.ChainId) } + return fmt.Errorf("cannot verify outTx body for chain %d", msg.ChainId) } // VerifyOutTxBodyEVM validates the sender address, nonce, chain id and tx hash. diff --git a/x/lightclient/module.go b/x/lightclient/module.go index e1872df098..ab1d287a6f 100644 --- a/x/lightclient/module.go +++ b/x/lightclient/module.go @@ -1,6 +1,7 @@ package lightclient import ( + "context" "encoding/json" "fmt" @@ -74,10 +75,10 @@ func (AppModuleBasic) RegisterRESTRoutes(_ client.Context, _ *mux.Router) { // RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the module. func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) { - //err := types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx)) - //if err != nil { - // fmt.Println("RegisterQueryHandlerClient err: %w", err) - //} + err := types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx)) + if err != nil { + fmt.Println("RegisterQueryHandlerClient err: %w", err) + } } // GetTxCmd returns the lightclient module's root tx command.