Commit Graph

14241 Commits

Author SHA1 Message Date
jl777
c1004caa42 Test 2017-03-24 02:21:23 +02:00
jl777
f21afd9420 Test 2017-03-24 02:11:26 +02:00
jl777
0cb1d2da0d Test 2017-03-24 02:09:32 +02:00
jl777
8c8a07ce24 Test 2017-03-24 01:57:33 +02:00
jl777
4b470a5801 Test 2017-03-24 01:54:48 +02:00
jl777
5150cb47a9 Test 2017-03-24 01:53:24 +02:00
jl777
89b6584b23 Test 2017-03-24 01:45:07 +02:00
jl777
d54aa57df4 Test 2017-03-24 01:41:11 +02:00
jl777
fa0a031c09 Test 2017-03-24 01:33:47 +02:00
jl777
58bec1f9b5 Test 2017-03-24 01:27:03 +02:00
jl777
7d44d3dddd Test 2017-03-24 01:19:53 +02:00
jl777
88416f2bc9 Test 2017-03-24 01:04:18 +02:00
jl777
e20babf1df Test 2017-03-24 01:01:49 +02:00
jl777
5ead8b4e85 Test 2017-03-24 00:55:19 +02:00
jl777
a710762818 Test 2017-03-24 00:51:12 +02:00
jl777
ad0b9d6237 Test 2017-03-24 00:47:51 +02:00
jl777
7fc4dca5eb Test 2017-03-24 00:36:23 +02:00
jl777
28c39e54b6 Test 2017-03-24 00:28:42 +02:00
jl777
8795f3397f Test 2017-03-24 00:23:47 +02:00
jl777
48b72e1725 Test 2017-03-24 00:16:18 +02:00
jl777
1a85595b5a Test 2017-03-24 00:14:38 +02:00
jl777
9f539d8804 Test 2017-03-24 00:13:52 +02:00
jl777
b575c4fb7b Test 2017-03-24 00:08:11 +02:00
jl777
c2123afed9 Test 2017-03-23 23:58:39 +02:00
jl777
52e5ebfdc2 Test 2017-03-23 23:22:08 +02:00
jl777
3fd98f8ff6 Test 2017-03-23 23:21:02 +02:00
jl777
9a9b36ca7e Test 2017-03-23 23:20:31 +02:00
jl777
b9551735cf Test 2017-03-23 23:07:51 +02:00
jl777
b2d09a90d4 Test 2017-03-23 22:46:42 +02:00
jl777
10c862f271 Test 2017-03-23 22:32:48 +02:00
jl777
4110a59a43 Test 2017-03-23 22:15:29 +02:00
Ian Kelling
629a875229 Docs: add details to -rpcclienttimeout doc 2017-03-24 09:03:59 +13:00
Luke Dashjr
c65969a5a6 Skip RAII event tests if libevent is built without event_set_mem_functions 2017-03-24 09:03:59 +13:00
Karl-Johan Alm
ca50af75b1 Added EVENT_CFLAGS to test makefile to explicitly include libevent headers. 2017-03-24 09:03:59 +13:00
Karl-Johan Alm
e8b6d84b9f Added some simple tests for the RAII-style events. 2017-03-24 09:03:59 +13:00
Karl-Johan Alm
68377e18a8 Switched bitcoin-cli.cpp to use RAII unique pointers with deleters. 2017-03-24 09:03:59 +13:00
Karl-Johan Alm
17fb609097 Added std::unique_ptr<> wrappers with deleters for libevent modules. 2017-03-24 09:03:59 +13:00
Wladimir J. van der Laan
7c2ab05969 bitcoin-cli: Make error message less confusing
Sorry for the churn on this, but the current message (introduced in #9073)
isn't acceptable:

    $ src/bitcoin-cli getinfo
    rpc: couldn't connect to server
    (make sure server is running and you are connecting to the correct RPC port: -1 unknown)

Putting the error code after the words "RPC port" made me wonder whether
there was a port configuration issue.

This changes it to:

    $ src/bitcoin-cli getinfo
    error: couldn't connect to server: unknown (code -1)
    (make sure server is running and you are connecting to the correct RPC port)
2017-03-24 09:03:59 +13:00
instagibbs
603205e381 Add common failure cases for rpc server connection failure 2017-03-24 09:03:59 +13:00
Wladimir J. van der Laan
6415573a59 bitcoin-cli: More detailed error reporting
Register a evhttp error handler to get a more detailed error message
if the HTTP request fails.
2017-03-24 09:03:59 +13:00
Wladimir J. van der Laan
08c581940a auto_ptr → unique_ptr
Change the few occurrences of the deprecated `auto_ptr` to c++11 `unique_ptr`.
Silences the deprecation warnings.

Also add a missing `std::` for consistency.
2017-03-24 09:03:59 +13:00
Wladimir J. van der Laan
0e2b1ae259 chain: define enum used as bit field as uint32_t
Bitwise logic combined with `<` with undefined signedness will
potentially results in undefined behavior. Fix this by defining the type
as a c++11 typed enum.

Fixes #6017.
2017-03-24 09:03:59 +13:00
Gregory Maxwell
599d2c4034 Avoid a compile error on hosts with libevent too old for EVENT_LOG_WARN.
This uses _EVENT_LOG_WARN instead, which appears to be defined in the
 old versions of libevent that I have on some systems.
2017-03-24 09:03:59 +13:00
Bob McElrath
c922edd00f Add explicit shared_ptr constructor due to C++11 error 2017-03-24 09:03:59 +13:00
Wladimir J. van der Laan
89bccddcd8 rpc: Split option -rpctimeout into -rpcservertimeout and -rpcclienttimeout
The two timeouts for the server and client, are essentially different:

- In the case of the server it should be a lower value to avoid clients
clogging up connection slots

- In the case of the client it should be a high value to accomedate slow
  responses from the server, for example for slow queries or when the
  lock is contended

Split the options into `-rpcservertimeout` and `-rpcclienttimeout` with
respective defaults of 30 and 900.
2017-03-24 09:03:59 +13:00
Wladimir J. van der Laan
a659991a2c http: Disable libevent debug logging, if not explicitly enabled
Add a option "-debug=libevent" to enable libevent debugging for troubleshooting.
Libevent logging is redirected to our own log.
2017-03-24 09:03:59 +13:00
Wladimir J. van der Laan
7ed4d40c61 init: Ignore SIGPIPE
Ignore SIGPIPE on all non-win32 OSes, otherwise an unexpectedly disconnecting
RPC client will terminate the application. This problem was introduced
with the libhttp-based RPC server.

Fixes #6660.
2017-03-24 09:03:59 +13:00
Jack Grigg
077ddc1187 Add libevent to zcash-gtest 2017-03-24 09:03:59 +13:00
Wladimir J. van der Laan
167b6231c9 Move windows socket init to utility function 2017-03-24 09:03:59 +13:00
Wladimir J. van der Laan
116503c0b8 Fix race condition between starting HTTP server thread and setting EventBase()
Split StartHTTPServer into InitHTTPServer and StartHTTPServer to give
clients a window to register their handlers without race conditions.

Thanks @ajweiss for figuring this out.
2017-03-24 09:03:59 +13:00