Commit Graph

50 Commits

Author SHA1 Message Date
Vivek Teega
5fbb1d2dd2 latest upstream changes 2020-01-28 16:21:11 +00:00
Neil Booth
c3039db50c Floor block count at 0
Fixes #653, #655
2018-11-23 17:02:38 +00:00
Neil Booth
0e866c776e Add BitcoinCashABC
LTOR block processing code by Mark Lundeberg
2018-11-17 11:36:44 -04:00
Neil Booth
7f2f9d4b29 Ensure we always fetch a block if there is one 2018-11-10 15:34:39 -04:00
JeremyRand
6e300cf18b Namecoin: Support indexing name scripts (#626)
* Namecoin: Extract addresses from name scripts.

* Namecoin: Index transaction history by name in addition to by script hash.
2018-10-19 15:35:39 -04:00
shyba
fab4ed21eb expose block polling delay (#622) 2018-10-16 06:40:55 +00:00
Neil Booth
cdb9034571 Tweak notification handling
Fixes #614, which could happen if a block was found immediately at
startup
2018-10-08 18:35:55 +00:00
John L. Jegutanis
f76e8b0a44 Fix reorg related bug (#594)
Changed to the correct self.db.read_raw_block and catch only
FileNotFoundError as it is the only one that should happen.
2018-09-12 23:16:52 +01:00
Neil Booth
ab17b4d529 Add is_generation memeber to TxInput
Use it in preference to is_gen_outpoint
2018-09-04 17:08:19 +01:00
John L. Jegutanis
a6d46fab8d Improve generation inputs handling
Fixes #570
2018-08-16 15:02:56 +02:00
Neil Booth
b087d1492b Controller tests daemon connectivity and auth first
Server base doesn't need a task group
2018-08-14 11:35:08 +09:00
John L. Jegutanis
00815442a9 Rename is_coinbase to is_generation and make it efficient (#569) 2018-08-12 20:43:08 +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
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
7f28677549 Merge branch 'master' into devel 2018-08-09 18:19:16 +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
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
955a8e927d Put flushing-to-DB in a thread
- flush() and backup_flush() are now async
2018-08-06 22:28:25 +09:00
Neil Booth
1efc8cb8ec Make the merkle cache and read_headers async
read_headers runs in a thread to avoid blocking
2018-08-06 21:49:26 +09:00
John L. Jegutanis
dbfe9096c2 Fix reorg crash due a missing await (#555) 2018-08-05 18:49:50 +09:00
John L. Jegutanis
0815ff8e24 Add Decred support (#550)
* Refactor reorg_hashes function

* Add Decred support
2018-08-02 22:20:36 +09:00
Neil Booth
751f9917a4 Switch to curio primitives
Gives much clearer code
2018-07-28 14:35:54 +08:00
Neil Booth
bef04750d7 Handle the case there are no blocks 2018-07-26 06:05:00 +08:00
Neil Booth
365c217031 header_mc might be None 2018-07-25 21:36:23 +08:00
Neil Booth
3fbd4992ce Rework prefetch logic
This also fixes a recent reorg bug...
2018-07-25 20:40:25 +08:00
Neil Booth
d008707330 Fix bug recently introduced in reorgs
Fixes #532
2018-07-25 15:25:40 +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
0c28136739 Remove dead code 2018-07-20 17:05:30 +08:00
Neil Booth
ca3ba2b2d8 Rework mempool and BP<->prefretcher communication 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
bd636a75ad Clean up the process of opening the DBs, make asynchronous 2018-07-20 12:26:59 +08:00
Neil Booth
94d1f7a651 Save raw blocks to disk for reorg purposes
We used to rely on the daemon being able to return the
orphaned blocks, but some old daemon codebases are buggy
and fail to do so.

Fixes #258 #315 #479
2018-07-18 16:09:19 +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
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
73a46df17f Remove hash_to_str 2018-07-14 21:48:58 +08:00
Neil Booth
d51f98e739 Create and use class_logger() utility function 2018-07-12 15:51:42 +08:00
Lex Berezhny
45111898b3 make it easier to configure logging for electrumx (#514)
* make it easier to configure logging for electrumx
2018-07-10 11:17:42 +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