aboutsummaryrefslogtreecommitdiffstats
path: root/rpc/client_test.go
Commit message (Collapse)AuthorAgeFilesLines
* p2p: add network simulation framework (#14982)Lewis Marshall2017-09-251-0/+32
| | | | | | This commit introduces a network simulation framework which can be used to run simulated networks of devp2p nodes. The intention is to use this for testing protocols, performing benchmarks and visualising emergent network behaviour.
* cmd/utils, node: remove unused solc references and improve RPC config (#14324)bas-vk2017-04-131-2/+2
| | | | | Currently http cors and websocket origins are a comma separated string in the config object. These are replaced with string arrays that are more expressive in case of a config file.
* all: import "context" instead of "golang.org/x/net/context"Felix Lange2017-03-231-1/+1
| | | | | | | | | | There is no need to depend on the old context package now that the minimum Go version is 1.7. The move to "context" eliminates our weird vendoring setup. Some vendored code still uses golang.org/x/net/context and it is now vendored in the normal way. This change triggered new vet checks around context.WithTimeout which didn't fire with golang.org/x/net/context.
* all: blidly swap out glog to our log15, logs need reworkPéter Szilágyi2017-02-231-8/+3
|
* rpc: add context argument to EthSubscribeFelix Lange2016-08-061-4/+4
| | | | | It's inconsistent not to pass it and most callers will work with contexts anyway.
* rpc: ensure client doesn't block for slow subscribersFelix Lange2016-08-061-0/+51
| | | | | | | | | | | | | | | | | | | | | I initially made the client block if the 100-element buffer was exceeded. It turns out that this is inconvenient for simple uses of the client which subscribe and perform calls on the same goroutine, e.g. client, _ := rpc.Dial(...) ch := make(chan int) // note: no buffer sub, _ := client.EthSubscribe(ch, "something") for event := range ch { client.Call(...) } This innocent looking code will lock up if the server suddenly decides to send 2000 notifications. In this case, the client's main loop won't accept the call because it is trying to deliver a notification to ch. The issue is kind of hard to explain in the docs and few people will actually read them. Buffering is the simple option and works with close to no overhead for subscribers that always listen.
* rpc: add new client, use it everywhereFelix Lange2016-07-231-0/+489
The new client implementation supports concurrent requests, subscriptions and replaces the various ad hoc RPC clients throughout go-ethereum.