Ethan Buchman
4671c44b2d
Merge pull request #13 from tendermint/allow-for-multiple-restarts
[WSClient] allow for multiple restarts
8 years ago
Ethan Buchman
052c2c1575
Merge pull request #11 from tendermint/feature/refactor-tests
WSClient failing to echo bytes
8 years ago
Ethan Buchman
4b30cb3083
test: check err on cmd.Wait
8 years ago
Ethan Buchman
8c38543357
fix error msg
8 years ago
Ethan Buchman
c3295f4878
RPCRequest.Params can be map[string]interface{} or []interface{}
8 years ago
Ethan Frey
9d18cbe74e
Remove race condition between read go-routine and stop
8 years ago
Anton Kaliaev
ba5382b70e
open result&error channels on start
8 years ago
Anton Kaliaev
b0d2032488
use BaseService.OnReset method to recreate channels
8 years ago
Anton Kaliaev
a416c37ebd
Merge pull request #12 from tendermint/close-ws-connection
close ws connection on Stop
8 years ago
Anton Kaliaev
d6587be7bc
[WSClient] allow for multiple restarts
needed for 3044f66ba9
See https://github.com/tendermint/tools/issues/6
8 years ago
Anton Kaliaev
afc39febed
close ws connection on Stop
8 years ago
Anton Kaliaev
b54b9b4ecc
update url to network monitor [ci skip] [circleci skip]
8 years ago
Anton Kaliaev
5d19a008ce
add Call method to WSClient, which does proper encoding of params
8 years ago
Anton Kaliaev
3233c9c003
WSClient failed to "echo_bytes"
Error:
```
Expected nil, but got: encoding/hex: invalid byte: U+0078 'x'
```
8 years ago
Anton Kaliaev
c88257b038
rename rpc function status to echo
echo means we're returning the input, which is exactly what this
function does.
8 years ago
Anton Kaliaev
0874c72819
refactor tests
8 years ago
Anton Kaliaev
d66ebbd904
use testify package
8 years ago
Anton Kaliaev
1a3573bf17
Merge pull request #10 from tendermint/feature/4-rename-http-clients
rename ClientURI -> URIClient, ClientJSONRPC -> JSONRPCClient
8 years ago
Anton Kaliaev
e6c083f589
rename ClientURI -> URIClient, ClientJSONRPC -> JSONRPCClient (Refs #4 )
8 years ago
Anton Kaliaev
759060f47e
Merge pull request #9 from tendermint/feature/8-http-interface-and-1-key-value-params-json-rpc
support key-value params in JSONRPC
8 years ago
Ethan Frey
715f78e26a
Properly encode json.RawMessage
8 years ago
Anton Kaliaev
db69845ded
introduce errors pkg
8 years ago
Anton Kaliaev
ff90224ba8
fix "Expected map but got type string" error
Error from tendermint:
```
panic: Expected map but got type string [recovered]
panic: Expected map but got type string
goroutine 82 [running]:
testing.tRunner.func1(0xc420464000)
/usr/local/go/src/testing/testing.go:622 +0x29d
panic(0xa1fda0, 0xc4201eecd0)
/usr/local/go/src/runtime/panic.go:489 +0x2cf
github.com/tendermint/tendermint/rpc/test.waitForEvent(0xc420464000, 0xc420064000, 0xae6fae, 0x8, 0xae6f01, 0xc2e998, 0xc2e9a0)
/home/vagrant/go/src/github.com/tendermint/tendermint/rpc/test/helpers.go:179 +0x53a
github.com/tendermint/tendermint/rpc/test.TestWSNewBlock(0xc420464000)
/home/vagrant/go/src/github.com/tendermint/tendermint/rpc/test/client_test.go:190 +0x12e
testing.tRunner(0xc420464000, 0xc2e9a8)
/usr/local/go/src/testing/testing.go:657 +0x96
created by testing.(*T).Run
/usr/local/go/src/testing/testing.go:697 +0x2ca
```
8 years ago
Anton Kaliaev
720b74d89e
read from ErrorsCh also
8 years ago
Anton Kaliaev
05e1a22d5b
encode params before sending in JSONRPC
8 years ago
Anton Kaliaev
cf11e6ba65
add CHANGELOG
8 years ago
Anton Kaliaev
1ddb60b6e7
refactor jsonParamsToArgs
Suggested in https://github.com/tendermint/go-rpc/pull/9#discussion_r105098390
8 years ago
Anton Kaliaev
fed84f875c
fix jsonParamsToArgsWS index error
Error from tendermint:
```
panic: runtime error: index out of range
goroutine 82 [running]:
github.com/tendermint/tendermint/vendor/github.com/tendermint/go-rpc/server.jsonParamsToArgsWS(0xc4200960e0, 0xc42024d4a0, 0xc420215380, 0x3, 0x0, 0x0, 0xc420215383, 0x9, 0xc42024d4a0, 0xf1ecc0, ...)
/home/vagrant/go/src/github.com/tendermint/tendermint/vendor/github.com/tendermint/go-rpc/server/handlers.go:184 +0x654
github.com/tendermint/tendermint/vendor/github.com/tendermint/go-rpc/server.(*wsConnection).readRoutine(0xc4201fd0e0)
/home/vagrant/go/src/github.com/tendermint/tendermint/vendor/github.com/tendermint/go-rpc/server/handlers.go:496 +0x3a9
created by github.com/tendermint/tendermint/vendor/github.com/tendermint/go-rpc/server.(*wsConnection).OnStart
/home/vagrant/go/src/github.com/tendermint/tendermint/vendor/github.com/tendermint/go-rpc/server/handlers.go:377 +0x45
```
8 years ago
Anton Kaliaev
1842e03315
revert using local import
this breaks the client's code (e.g. tendermint)
8 years ago
Anton Kaliaev
d033cd54b8
add editorconfig
8 years ago
Anton Kaliaev
2dc6ab3896
use golang default if an arg is missing (Refs #7 )
8 years ago
Anton Kaliaev
6d66cc68ed
make sure we are using correct server
also remove it afterwards
8 years ago
Anton Kaliaev
51d760f29f
use local import for testing
8 years ago
Anton Kaliaev
22ba8bdef8
fix Call method signature in HTTPClient interface
8 years ago
Anton Kaliaev
d43e3db978
fix circleci
8 years ago
Anton Kaliaev
26ccb4c94a
remove private call methods
Q: what was the reason to create them?
8 years ago
Anton Kaliaev
c128957723
"must remove file for test to run again" - no way I am doing this by hands, too lazy :)
8 years ago
Anton Kaliaev
66867bf949
remove "rpc" prefix from package imports
8 years ago
Anton Kaliaev
e1d5873bdf
support key-value params in JSONRPC (Refs #1 )
More changes:
- remove Client interface (reason: empty)
- introduce HTTPClient interface, which can be used for both ClientURI
and ClientJSONRPC clients (so our users don't have to create their own) (Refs #8 )
- rename integration tests script to `integration_test.sh`
- do not update deps on `get_deps`
8 years ago
Anton Kaliaev
b03facd828
add Dockerfile
8 years ago
Ethan Buchman
fcea0cda21
Merge pull request #6 from tendermint/develop
v0.6.0
8 years ago
Ethan Buchman
6177eb8398
love you circley
8 years ago
Ethan Buchman
ac443fa61f
run tests from bash script
8 years ago
Ethan Buchman
08f2b5bc84
get deps for testing
8 years ago
Ethan Buchman
de56442660
Merge branch 'master' into develop
8 years ago
Ethan Buchman
94fed25975
fix test
8 years ago
Ethan Buchman
0eb278ad3b
version bump 0.6.0
8 years ago
Ethan Buchman
b494cc5219
Merge pull request #5 from mappum/develop
Fix hex string handling
8 years ago
Matt Bell
4d7aa62a10
Added test for unexpected hex string type HTTP args
8 years ago
Matt Bell
86506cd4f8
Handle quoted and hex string type HTTP args for both 'string' and '[]byte' type function args
8 years ago