-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Closed
Labels
C:docsComponent: DocumentationComponent: DocumentationC:rpcComponent: JSON RPC, gRPCComponent: JSON RPC, gRPCS:waitingStatus: Waiting for responseStatus: Waiting for response
Description
Tendermint version: 0.30.2
Environment:
- OS: macOS 10.14.4
- Install tools: docker
Have you tried the latest version: no
I'm trying to run example from https://tendermint.com/rpc/#subscribe , but I'm not sure if I'm using correct imports. In doc, there is a client, but no import, and I use rpc/client:
rpcclient "github.com/tendermint/tendermint/rpc/client"
client := rpcclient.NewHTTP(...)
ctx, _ := context.WithTimeout(context.Background(), 10 * time.Second)
query := "tm.event = 'Tx' AND tx.height = 3"
resultCh, err := client.Subscribe(ctx, "test-client", query, 1)I had to tweak the code a bit (query is string, not Query, txs => resultCh), and now I'm stuck with SIGSEGV.
Minified stack trace:
panic SIGSEGV
rpc/lib/client.(*WSClient).Call(0x0, ...) ws_client.go:217
rpc/lib/client.(*WSClient).Subscribe(0x0, ...) ws_client.go:485
rpc/client.(*WSEvents).Subscribe(...) httpclient.go:309
test
P.S. Also, there's shell example missing. I could contribute it, but it will require usage of websocat. Would you accept such an example? It could look like this:
# installation info: https://github.com/vi/websocat
websocat -t --jsonrpc ws://localhost:26657/websocket
subscribe "tm.event = 'Tx'"Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
C:docsComponent: DocumentationComponent: DocumentationC:rpcComponent: JSON RPC, gRPCComponent: JSON RPC, gRPCS:waitingStatus: Waiting for responseStatus: Waiting for response