test(systemtest): Fix QueryBySig (#23102)
This commit is contained in:
parent
aabd4b1922
commit
784d1c8763
@ -526,12 +526,20 @@ func (c *consensus[T]) maybeHandleExternalServices(ctx context.Context, req *abc
|
||||
if strings.HasPrefix(req.Path, "/cosmos.tx.v1beta1.Service") {
|
||||
rpcClient, _ := client.NewClientFromNode(c.cfg.AppTomlConfig.Address)
|
||||
|
||||
txConfig := authtx.NewTxConfig(
|
||||
c.appCodecs.AppCodec,
|
||||
c.appCodecs.AppCodec.InterfaceRegistry().SigningContext().AddressCodec(),
|
||||
c.appCodecs.AppCodec.InterfaceRegistry().SigningContext().ValidatorAddressCodec(),
|
||||
authtx.DefaultSignModes,
|
||||
)
|
||||
|
||||
// init simple client context
|
||||
clientCtx := client.Context{}.
|
||||
WithLegacyAmino(c.appCodecs.LegacyAmino.(*codec.LegacyAmino)).
|
||||
WithCodec(c.appCodecs.AppCodec).
|
||||
WithNodeURI(c.cfg.AppTomlConfig.Address).
|
||||
WithClient(rpcClient)
|
||||
WithClient(rpcClient).
|
||||
WithTxConfig(txConfig)
|
||||
|
||||
txService := txServer[T]{
|
||||
clientCtx: clientCtx,
|
||||
|
||||
@ -947,7 +947,7 @@ func TestTxDecodeAmino_GRPC(t *testing.T) {
|
||||
}{
|
||||
{"nil request", nil, true, "request cannot be nil"},
|
||||
{"empty request", &tx.TxDecodeAminoRequest{}, true, "invalid empty tx bytes"},
|
||||
{"invalid tx bytes", &tx.TxDecodeAminoRequest{AminoBinary: invalidTxBytes}, true, "invalid request"},
|
||||
{"invalid tx bytes", &tx.TxDecodeAminoRequest{AminoBinary: invalidTxBytes}, true, "unmarshal to legacytx.StdTx failed"},
|
||||
{"valid request with tx bytes", &tx.TxDecodeAminoRequest{AminoBinary: encodedTx}, false, ""},
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user