Commit Graph

40 Commits

Author SHA1 Message Date
Neil Booth
7b9cd944be Require aiorpcX 0.5.9 2018-07-29 05:58:44 +08:00
Neil Booth
751f9917a4 Switch to curio primitives
Gives much clearer code
2018-07-28 14:35:54 +08:00
Neil Booth
5ee5a54f5a Session manager owns peer manager 2018-07-28 09:22:19 +08:00
Neil Booth
68dbf9fad2 Tweak task handling so all errors are logged 2018-07-25 21:35:05 +08:00
Neil Booth
221f1222a6 Defer peer discovery 2018-07-24 09:20:45 +08:00
Neil Booth
3e535e47f4 Start peer discovery whilst syncing the mempool 2018-07-23 15:18:49 +08:00
Neil Booth
9bd9476a54 Make mempool processing more properly asynchronous 2018-07-22 21:56:22 +08:00
Neil Booth
2c51b127de Clarify mempool's exported interface 2018-07-22 13:25:13 +08:00
Neil Booth
35506f6054 Make notifications properly async 2018-07-22 10:38:37 +08:00
Neil Booth
e568ee2488 Improve comments 2018-07-21 20:51:42 +08:00
Neil Booth
c715ae6249 Rework mempool and notification code
Clarifies the mempool interface to look more like what it
would in its own process
2018-07-21 20:45:27 +08:00
Neil Booth
8e99d076b6 Logging tweaks 2018-07-20 16:43:15 +08:00
Neil Booth
530c7cac6f Clean up shutdown process of the block processor
- enables removal of executor code
- clarify flush guarantees
2018-07-20 15:06:28 +08:00
Neil Booth
41e734caeb Clean up controller interface with other parts 2018-07-20 12:40:57 +08:00
Neil Booth
7ce91b1a43 Minor tweaks 2018-07-18 14:22:40 +08:00
Neil Booth
391e69b66c Introduce ChainState object
- reduces the tangle of object dependencies
- rationalizes responsibilities
2018-07-18 14:05:39 +08:00
Neil Booth
53425ce585 Move task logic to Tasks object
This helps to rationalize the inter-object
dependencies.
2018-07-18 11:30:33 +08:00
Neil Booth
22b01d4dfb Move masternode cache.
It was mistakenly made a pylru cache...
Don't force non-Dash coins to carry the cache.
2018-07-18 11:30:33 +08:00
Neil Booth
9cf3b5358f Move raw_header to session manager
Ultimately this stuff belongs in a ChainState object.
2018-07-18 11:30:33 +08:00
Neil Booth
b7572ce9c0 More refactoring of controller
- remove the header cache - not needed for higher protocol versions
- simplify session notification; move to session manager
- move history cache to session manager
2018-07-18 09:20:14 +08:00
Neil Booth
c7f6f3ede6 Move get_utxos to session 2018-07-17 22:12:41 +08:00
Neil Booth
a3d3bbe9a7 Move more code out of controller to sessions
Disable a test that will require significant work
2018-07-17 20:20:28 +08:00
Neil Booth
e41d1db25c Create SessionManager class
Break out controller functionality for session management.
2018-07-17 18:14:55 +08:00
Neil Booth
c35c062780 Move more code to session class from controller 2018-07-17 16:47:00 +08:00
Neil Booth
063f1b2eff Move block_get_header and estimate_fee to session 2018-07-17 14:45:55 +08:00
Neil Booth
ca777ed427 Move three more methods from the controller to session 2018-07-17 11:56:26 +08:00
Neil Booth
3dbc10bca0 Move address handlers from controller to session 2018-07-17 11:44:15 +08:00
Neil Booth
4f99f254ea Move scripthash handlers from controller to session 2018-07-17 11:32:42 +08:00
Neil Booth
739bb687fc Convert PROTOCOL_MIN, PROTOCOL_MAX to tuples 2018-07-17 10:59:41 +08:00
Neil Booth
c790fd567c Move things from Controller to session class
which better belong there:

- PROTOCOL_MIN, PROTOCOL_MAX
- server_features()
- server_version_args()
- inline protocol_tuple()
2018-07-17 09:33:33 +08:00
Neil Booth
fdb34e7d25 Store session's protocol version as a tuple, not string 2018-07-17 09:16:57 +08:00
Neil Booth
382fc5ed44 Improve logging of client version requests 2018-07-16 21:25:50 +08:00
Neil Booth
8630c9136c Have the header merkle cache handle reorgs
Cleanest to move the mc_cache to the block processor
2018-07-16 20:54:55 +08:00
Neil Booth
362499778a Prepare 1.6pre1 2018-07-16 19:18:36 +08:00
Neil Booth
46d8e0c608 Implement merkle proofs for blockchain.block.header 2018-07-16 16:02:55 +08:00
Neil Booth
3c3a1b7017 Fix thinko in prior
Rename function to prevent similar mistakes in future

Also hash_to_str -> hash_to_hex_str
2018-07-14 21:29:11 +08:00
Neil Booth
c22b7d455c Have server code use merkle library 2018-07-14 20:11:34 +08:00
Neil Booth
c35ac6d9bb Deprecate blockchain.block.get_header as of protocol 1.3
Use new blockchain.block.header instead.
2018-07-12 00:31:49 +08:00
Lex Berezhny
71b3d30842 Server listening (#516)
* + server_listening Event in Controller (to know when server has fully started)
2018-07-11 08:50:10 +08:00
Lex Berezhny
29289004e7 electrumx package (#511)
* moved wallet, server, lib into electrumx main module

* fixed imports and other path references affected by electrumx main package

* fixing formatting to pass the pycodetest on travis
2018-07-10 07:28:04 +08:00