Neil Booth
b8fc739590
Fix ordering in get_utxos
8 years ago
Neil Booth
6aef79461f
Don't shut down block processor by cancellation
The block processor needs to be able to close cleanly, and not
mid-block. In order to be able to yield whilst processing blocks
we cannot forcefully close its coroutine with a cancellation.
8 years ago
Neil Booth
1b95bcd8ac
Open DB differently depending on if syncing
If syncing, use a high max_open_files, otherwise lower it.
8 years ago
Neil Booth
95a2de6dae
Move DB undo code to db.py
8 years ago
Neil Booth
8d253c81d3
Move clean_db() to db.py
8 years ago
Neil Booth
59244cc24e
Move bulk of FS flush code to db.py
More logically belongs there.
Have servers use the flushed DB height not the block processor's height.
Get all headers only from disk.
8 years ago
Neil Booth
59733e4609
Move bitcoin-specific coin defaults to Bitcoin
8 years ago
TheLazieR Yip
e987510432
Replace double_sha256 with header_hash from coin
8 years ago
Neil Booth
aa9f106865
Add missing self; use max_secs where intended.
8 years ago
Neil Booth
8617c82ec2
Floor disk_count at zero.
8 years ago
Neil Booth
3d87e299ea
Move formatted_time to library
8 years ago
Neil Booth
ffd6cd63b0
Fix thinko
8 years ago
Neil Booth
d6fa4a1564
More logging improvements
- log software and DB version at startup
- log more DB info at startup
- log software and DB version when first synced
Fixes #29
8 years ago
Neil Booth
f4651c0ca4
Store tx_num in 'h' table key so keys are unique
8 years ago
Neil Booth
c5c7b6f438
Have all expensive requests yield.
8 years ago
Neil Booth
85786b87a2
Save all UTXOs
Change the DB version
8 years ago
Neil Booth
1b9a9b8927
Start saving DB version and checking it
8 years ago
Neil Booth
f98dc9c351
Practise optimism like before
8 years ago
Neil Booth
311f7f9ffd
Better optimised storage of UTXO set
8 years ago
Neil Booth
094fd44fc2
Merge UTXO cache into BlockProcessor
8 years ago
Neil Booth
06b6d695c2
Only attempt to flush if cancelled
8 years ago
Neil Booth
3972e18e98
Move the rest of fs_cache into BlockProcessor
8 years ago
Neil Booth
ad2dabf751
Remove the FS cache
Really belongs with BlockProcessor now
8 years ago
Neil Booth
5736e9cb70
Move utxo_cache to BlockProcessor where it belongs
8 years ago
Neil Booth
5c5e90d574
Move BlockServer to more appropriate location
8 years ago
Neil Booth
93d53bdd87
The controller is dead!
8 years ago
Neil Booth
c0a112f8ea
Split out part of block processor into db.py
The part that doesn't actually do any block processing...
8 years ago
Neil Booth
c008c04e43
Move caches to their own file.
Move the DB to the block_processor file. It will merge with it soon.
8 years ago
Neil Booth
30d1b7f77c
Add proper block chaining check
8 years ago
Neil Booth
78d0acc95b
Fix get_tx_hash
8 years ago
Neil Booth
28eb95edd3
Break out FS cache into its own class
8 years ago
Neil Booth
334ffdaa4f
Begin work on proper server
8 years ago
Neil Booth
c8f3c79167
Memory views for blocks don't seem to help
8 years ago
Neil Booth
19cbb2d00d
Fix ETA estimate
8 years ago
Neil Booth
282d46a46c
Flush to disk when flushing history
8 years ago
Neil Booth
34096a02e9
Recovery from excess history flushes
8 years ago
Neil Booth
cbe1ef60ca
Better logging
8 years ago
Neil Booth
5f77ff4ef0
Flush history separately.
We do not yet remove excess history.
8 years ago
Neil Booth
6b513a91d0
CACHE_MB is now the environment var.
8 years ago
Neil Booth
4b99ae4e11
Fix ETA calc
8 years ago
Neil Booth
3fce298835
Better time est. A couple of fixes.
8 years ago
Neil Booth
5653bf75f5
More robust init
8 years ago
Neil Booth
ba1662bbf7
Add ETA stats. Show daemon height again.
8 years ago
Neil Booth
c7f930a18a
Clean up db initialization and state writing
8 years ago
Neil Booth
d8e9eb7796
Accurate cache accounting
8 years ago
Neil Booth
682cc8ff86
Better size est.
8 years ago
Neil Booth
d11c60f6ad
Cache size logging
8 years ago
Neil Booth
14f4228af7
Add missing line
8 years ago
Neil Booth
4e777b5861
Let's try a smarter UTXO cache.
8 years ago
Neil Booth
6644102441
Use hash168 to distinguish address types in DB
8 years ago