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
5 years ago
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.
5 years ago
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
5 years ago
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`.
5 years ago
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
5 years ago
Ethan Frey
931af6a072
Combine local and http into client package, unify tests with table-driven tests
8 years ago
Ethan Frey
cd9ee9d84b
cleanup
8 years ago
Ethan Frey
26f4b5c98e
Clean up package names
8 years ago
Ethan Frey
ce044dbb76
Extracted Clients into a consistent interface, fixed type issue in http.Client
8 years ago
Ethan Frey
7c26be3242
Begin implementation of local client
8 years ago