Anton Kaliaev
ce3c9c2341
rpc/core: return an error if page=0 ( #4947 )
...
* rpc/core: return an error if `page=0`
Closes #4942
affected endpoints:
- /validators
- /tx_search
* swagger: update doc for /unconfirmed_txs
2020-06-03 16:51:51 +04:00
Federico Kunze
da924fc62d
rpc: add BlockByHash to Client ( #4923 )
...
Ethermint currently has to maintain a map height-> block hash on the store (see here) as it needs to expose the eth_getBlockByHash JSON-RPC query for Web3 compatibility. This query is currently not supported by the tendermint RPC client.
2020-06-01 09:04:45 +04:00
Anton Kaliaev
a14ff5cb30
rpc: refactor lib folder ( #4836 )
...
Closes https://github.com/tendermint/tendermint/issues/3857
Moves `lib/` folder to `jsonrpc/`.
Renames:
**packages**
`rpc` package -> `jsonrpc` package
`rpcclient` package -> `client` package
`rpcserver` package -> `server` package
**structs and interfaces**
```
JSONRPCClient to Client
JSONRPCRequestBatch to RequestBatch
JSONRPCCaller to Caller
```
**functions**
```
StartHTTPServer to Serve
StartHTTPAndTLSServer to ServeTLS
rpc/jsonrpc/client: rename NewURIClient to NewURI
NewJSONRPCClient to New
NewJSONRPCClientWithHTTPClient to NewWithHTTPClient
NewWSClient to NewWS
```
**misc**
- unexpose `ResponseWriterWrapper`
- remove unused http_params.go
2020-05-13 16:40:57 +04:00
Anton Kaliaev
b7b721c484
change use of errors.Wrap to fmt.Errorf with %w verb
...
Closes #4603
Commands used (VIM):
```
:args `rg -l errors.Wrap`
:argdo normal @q | update
```
where q is a macros rewriting the `errors.Wrap` to `fmt.Errorf`.
2020-05-12 03:35:47 +00:00
Erik Grinaker
fdf9c7ae64
rpc/client: split out client packages ( #4628 )
...
* rpc/client: initial split into directories
* lite2: split out test package
* rpc/client: simplify client constructurs
* updated docs
* updated changelog
2020-04-02 13:25:30 +00:00