Apart from the flush on shutdown and the flush when caught up,
neither of which matter, this makes flushes asynchronous.
Also, block processing for reorgs is now asynchronous.
This also removes the FORCE_REORG debug envvar; I want to
put that into the RPC interface.
Closes#102
tx_hash needs to be that of the prior serialization, so
need to change internal read_block API.
Bitcoin core 0.13.1 broke backwards compat of the RPC interface.
Closes#92
It's less awkward and more explicit.
This brings back the efficiency lost in the 0.9.x series.
It also removes the special case hack: both when syncing and
caught up, block processing is done in the executor.
Fixes#58
Cleanup and simplify touched handling and its event, which is
now controlled and owned by the mempool.
The daemon object owns the set of current mempool hashes.
Clean up and simplify the mempool main loop.
Fixes#70.
When the number of sessions reaches MAX_SESSIONS, which defaults
to 1,000, turn off TCP and SSL listening sockets to prevent new
connections. When the session count falls below a low watermark,
currently 90% of MAX_SESSIONS, the listening sockets will be re-opened.
Helps prevent DoS and limit open file usage.
Bug fix: do not start serving paused connections until the buffer
socket is sufficiently drained. Also, loop.
Pause serving sessions whose socket buffer is full (anti-DoS)
Serve requests in batches of 8
Don't store the session in the request
RPC has priority 0; every other session at least 1
Periodically consolidate small session groups into 1
Add new RPC command requests.
Adjust sessions RPC command to show pending requests.
Only keep first 15 chars in version string.
Set socket timeout
Try more forceful closing of socket
Fixes#67
Batch requests are now processed and encoded incrementally.
Their bandwidth usage is also incrementally added, and so overlarge
responses are rejected as soon as they become too large.
JSON text is also more memory efficient than the python data
structures they represent.