Commit Graph

1495 Commits

Author SHA1 Message Date
Neil Booth
39f97cef90 Add comprehensive mempool tests 2018-08-11 16:15:55 +09:00
Neil Booth
279ca32e3a Break out some abstractions in coins.py 2018-08-11 16:15:55 +09:00
Neil Booth
f781d74ed5 Take sleep intervals as arguments
- make histogram refresh its own task
- make _update_histogram take bin_size argument
- synchronize the mempool refresh and hisogram calc with a lock
2018-08-11 16:15:55 +09:00
Neil Booth
f20fe9d7a5 Tweak mempool logging 2018-08-11 16:15:55 +09:00
Neil Booth
564449e223 Introduce MemPoolTxSummary 2018-08-11 16:15:55 +09:00
Neil Booth
90dcf87536 Create MemPoolAPI and use it 2018-08-11 16:15:55 +09:00
Neil Booth
4329724b98 Implement TX serialization
This will be used in other tests
2018-08-11 16:15:34 +09:00
Neil Booth
8b34de53f9 Add some utility functions and tests 2018-08-11 16:15:34 +09:00
Neil Booth
8861ebac8f Placate pycodestyle 2018-08-11 16:15:34 +09:00
Neil Booth
2304e943d4 Add pytest-asyncio to travis 2018-08-11 16:15:34 +09:00
Neil Booth
635ffed42b flush_data() must be called with the lock held 2018-08-10 11:41:02 +09:00
Neil Booth
967b2de60d Separate the block processor from the DB
- BP no longer inherits from the DB, but is passed it
2018-08-10 11:10:13 +09:00
Neil Booth
27b31746f8 Remove remaining flush-related logic to db.py 2018-08-10 11:10:13 +09:00
Neil Booth
a50d17c5b9 Clear data by reference as it's flushed 2018-08-10 11:10:13 +09:00
Neil Booth
dc445e2a54 Move catch-up stats to db.py 2018-08-10 11:10:13 +09:00
Neil Booth
891730e78f Move flush_backup() to db.py 2018-08-10 11:10:13 +09:00
Neil Booth
42c3a308db Move to flush_dbs in db.py 2018-08-10 11:10:13 +09:00
Neil Booth
d3f9ba386c Move flush_state() to db.py 2018-08-10 11:10:13 +09:00
Neil Booth
d1510b1192 Move bulk of UTXO flush logic to db.py 2018-08-10 11:10:13 +09:00
Neil Booth
9515e1a1e4 Improve flow for opening DBs 2018-08-10 11:10:13 +09:00
Neil Booth
aac84ade75 Sleep at shutdown 2018-08-10 11:10:13 +09:00
Neil Booth
c9631f3438 Move history flushing to DB.flush_history() 2018-08-10 11:10:13 +09:00
Neil Booth
11c6c919a6 Move fs_flush to db.py and merge with fs_update 2018-08-10 11:10:13 +09:00
Neil Booth
d87c3dedcf Move assert_flushed DB logic to db.py 2018-08-10 11:10:13 +09:00
Neil Booth
70319bb22d Merge branch 'master' into devel 2018-08-10 11:06:49 +09:00
Neil Booth
dd67b57c30 Catch and log failures in the main peers task
Closes #565
2018-08-10 09:52:49 +09:00
Neil Booth
afae1b4a42 Fix rare race condition
Closes #567
2018-08-10 09:20:56 +09:00
Neil Booth
83813ff1ac Extend SUPPRESS_MESSAGE_REGEX
Fixes #521
2018-08-10 06:25:27 +09:00
Neil Booth
7f28677549 Merge branch 'master' into devel 2018-08-09 18:19:16 +09:00
Neil Booth
9dff85c027 Prepare 1.8.2 2018-08-09 18:16:18 +09:00
Neil Booth
028374ede4 Shield the taking of the lock, otherwise it is lost 2018-08-09 17:28:34 +09:00
Neil Booth
e95f556234 Merge branch 'master' into devel 2018-08-09 15:40:07 +09:00
Neil Booth
e2d3f655fb Set retry_event on correct object
Fixes #564
2018-08-09 15:29:10 +09:00
Neil Booth
9a2dfa9ab0 Merge branch 'master' into devel 2018-08-09 06:36:24 +09:00
Neil Booth
ab848ed312 Update aiorpcX dep in setup.py
Fixes #563
2018-08-09 06:25:23 +09:00
Neil Booth
87d55c3fc5 Prepare 1.8.1 2018-08-08 23:18:06 +09:00
Neil Booth
9b22fd3a15 Peer verification needs to be serial... 2018-08-08 20:32:51 +09:00
Neil Booth
09edee6091 Merge branch 'mc-initialization' into devel 2018-08-08 17:51:01 +09:00
Neil Booth
e0ccf0cce3 Populate the header merkle cache in a thread
- It can take a while
- Client requests that need it will block until it's done
- It's a function of FS state so move it to the DB
- Tweak docs

Fixes #558
2018-08-08 17:26:34 +09:00
Neil Booth
0a8045278a Merge branch 'no-shutdown-hacks' into devel 2018-08-08 16:34:21 +09:00
Neil Booth
2803ef913e Merge branch 'master' into devel 2018-08-08 16:33:11 +09:00
Neil Booth
28ea9ae2f4 Remove hackery 2018-08-08 14:58:52 +09:00
Neil Booth
12c49bbe75 Suppress accept_connection2 asyncio log spew 2018-08-08 12:48:22 +09:00
Neil Booth
931b227618 Verify a peer concurrently 2018-08-08 12:40:48 +09:00
Neil Booth
9b4276c68d Have peers.py use its own task group 2018-08-08 12:35:58 +09:00
Neil Booth
9c5d59e997 Use new Session interface 2018-08-08 12:19:26 +09:00
Neil Booth
2d66a4f5aa aiorpcX 0.7.0 has better string text for TaskTimeout 2018-08-08 12:19:18 +09:00
Neil Booth
6697614427 Use close from aiorpcX 0.7.0 2018-08-08 12:19:09 +09:00
Neil Booth
962b4679d7 Require aiorpcX 0.7.0 2018-08-08 12:18:57 +09:00
Neil Booth
a3afab83d6 Better handle bad input to query RPC call
Based on #559.  Also:

- remove unused import
- restore timeout to 15s
- handle invalid input by catching at a higher level
  and converting to RPCError
2018-08-07 21:21:27 +09:00