mirror of
https://github.com/tendermint/tendermint.git
synced 2026-09-03 06:37:14 +00:00
Add upgrading notes for the new Events RPC interface. (#7993)
Add deprecation logs when websocket is enabled As promised in ADR 075, this causes the node to log (without error) when websocket transport is enabled, and also when subscribers connect.
This commit is contained in:
@@ -287,6 +287,8 @@ func (env *Environment) StartService(ctx context.Context, conf *config.Config) (
|
||||
if conf.RPC.ExperimentalDisableWebsocket {
|
||||
rpcLogger.Info("Disabling websocket endpoints (experimental-disable-websocket=true)")
|
||||
} else {
|
||||
rpcLogger.Info("WARNING: Websocket RPC access is deprecated and will be removed " +
|
||||
"in Tendermint v0.37. See https://tinyurl.com/adr075 for more information.")
|
||||
wmLogger := rpcLogger.With("protocol", "websocket")
|
||||
wm := rpcserver.NewWebsocketManager(wmLogger, routes,
|
||||
rpcserver.OnDisconnect(func(remoteAddr string) {
|
||||
|
||||
@@ -38,6 +38,8 @@ func (env *Environment) Subscribe(ctx context.Context, query string) (*coretypes
|
||||
return nil, errors.New("maximum query length exceeded")
|
||||
}
|
||||
|
||||
env.Logger.Info("WARNING: Websocket subscriptions are deprecated and will be removed " +
|
||||
"in Tendermint v0.37. See https://tinyurl.com/adr075 for more information.")
|
||||
env.Logger.Info("Subscribe to query", "remote", addr, "query", query)
|
||||
|
||||
q, err := tmquery.New(query)
|
||||
|
||||
Reference in New Issue
Block a user