diff --git a/internal/rpc/core/events.go b/internal/rpc/core/events.go index 621977c66..7dfcbd30c 100644 --- a/internal/rpc/core/events.go +++ b/internal/rpc/core/events.go @@ -84,7 +84,7 @@ func (env *Environment) Subscribe(ctx context.Context, req *coretypes.RequestSub // We have a message to deliver to the client. resp := callInfo.RPCRequest.MakeResponse(&coretypes.ResultEvent{ Query: req.Query, - Data: msg.LegacyData(), + Data: msg.Data(), Events: msg.Events(), }) wctx, cancel := context.WithTimeout(opctx, 10*time.Second) diff --git a/rpc/client/local/local.go b/rpc/client/local/local.go index 0b2b5205a..51a43eb39 100644 --- a/rpc/client/local/local.go +++ b/rpc/client/local/local.go @@ -273,7 +273,7 @@ func (c *Local) eventsRoutine(ctx context.Context, sub eventbus.Subscription, su case outc <- coretypes.ResultEvent{ SubscriptionID: msg.SubscriptionID(), Query: qstr, - Data: msg.LegacyData(), + Data: msg.Data(), Events: msg.Events(), }: case <-ctx.Done(): diff --git a/rpc/client/rpc_test.go b/rpc/client/rpc_test.go index 2316b5f58..29fbec3e6 100644 --- a/rpc/client/rpc_test.go +++ b/rpc/client/rpc_test.go @@ -4,6 +4,7 @@ import ( "bytes" "context" "encoding/base64" + "fmt" "math" "net/http" @@ -21,6 +22,7 @@ import ( "github.com/tendermint/tendermint/crypto/encoding" "github.com/tendermint/tendermint/internal/mempool" rpccore "github.com/tendermint/tendermint/internal/rpc/core" + tmjson "github.com/tendermint/tendermint/libs/json" "github.com/tendermint/tendermint/libs/log" tmmath "github.com/tendermint/tendermint/libs/math" @@ -495,9 +497,9 @@ func TestClientMethodCalls(t *testing.T) { for i := int64(0); i < 3; i++ { event := <-eventCh - blockEvent, ok := event.Data.(types.LegacyEventDataNewBlock) + blockEvent, ok := event.Data.(types.EventDataNewBlock) if !ok { - blockEventPtr, okPtr := event.Data.(*types.LegacyEventDataNewBlock) + blockEventPtr, okPtr := event.Data.(*types.EventDataNewBlock) if okPtr { blockEvent = *blockEventPtr } diff --git a/rpc/coretypes/responses.go b/rpc/coretypes/responses.go index cce419b55..122a679ee 100644 --- a/rpc/coretypes/responses.go +++ b/rpc/coretypes/responses.go @@ -327,7 +327,7 @@ type ( type ResultEvent struct { SubscriptionID string Query string - Data types.LegacyEventData + Data types.EventData Events []abci.Event }