-
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, gRPC
Description
Tendermint version (use tendermint version or git rev-parse --verify HEAD if installed from source):
name = "github.com/tendermint/tendermint"
version = "0.30.0"
Environment:
- OS (e.g. from /etc/os-release): MacOS High Sierra
- Install tools: local go app
What happened:
This line of code should return ResultTx message.
However, it is not working. I am not too sure if I am using it incorrectly or this is a bug.
> tx, err := client.Tx([]byte("2B8EC32BA2579B3B8606E42C06DE2F7AFA2556EF"), true)
https://github.com/tendermint/tendermint/blob/master/rpc/core/tx.go#L29
I connected to gaia-12k testnet full node by using websocket like below and successfully received return ResultStatus message from client.Status(). However, Tx() method doesn't seem to work.
How to reproduce it (as minimally and precisely as possible):
I added tendermint v0.30.0 and cosmos-sdk v0.32.0 in my go app.
// txHash: f87370f68c82d9ac7201248eca48cec5f16ffec99c461c1b2961341a2fe9c1c8
func main() {
rpcClient := client.NewHTTP("http://52.78.163.36:26657", "/websocket")
status, err := rpcClient.Status()
if err != nil {
fmt.Println(err)
}
fmt.Println(status.SyncInfo.LatestBlockHeight)
tx, err := rpcClient.Tx([]byte("f87370f68c82d9ac7201248eca48cec5f16ffec99c461c1b2961341a2fe9c1c8"), false)
if err != nil {
fmt.Println(err)
}
fmt.Println(tx.Height)
}
Logs (paste a small part showing an error (< 10 lines) or link a pastebin, gist, etc. containing more of the log file):
Tx: Response error: RPC error -32603 - Internal error: Tx (46383733373046363843383244394143373230313234384543413438434543354631364646454339394334363143314232393631333431413246453943314338) not found
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x176f362]
goroutine 1 [running]:
main.test(0xc4205e3ac0)
/Users/coincube/go/src/cosmos-test/main.go:65 +0xd2
main.main()
/Users/coincube/go/src/cosmos-test/main.go:48 +0x16d
exit status 2
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
C:docsComponent: DocumentationComponent: DocumentationC:rpcComponent: JSON RPC, gRPCComponent: JSON RPC, gRPC