cleanup
This commit is contained in:
parent
f46bf0924a
commit
5ec8f355d4
1 changed files with 1 additions and 16 deletions
|
@ -52,21 +52,6 @@ UTXO_STATE = b'state-utxo'
|
||||||
HIST_STATE = b'state-hist'
|
HIST_STATE = b'state-hist'
|
||||||
|
|
||||||
|
|
||||||
class RocksDBState(typing.NamedTuple):
|
|
||||||
db_version: int
|
|
||||||
genesis_hash: str
|
|
||||||
height: int
|
|
||||||
tx_count: int
|
|
||||||
tip: bytes
|
|
||||||
utxo_flush_count: int
|
|
||||||
wall_time: int
|
|
||||||
first_sync: bool
|
|
||||||
|
|
||||||
flush_count: int
|
|
||||||
comp_flush_count: int
|
|
||||||
comp_cursor: int
|
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
class RocksReaderContext:
|
class RocksReaderContext:
|
||||||
db: 'RocksDB'
|
db: 'RocksDB'
|
||||||
|
@ -140,7 +125,7 @@ def _teardown():
|
||||||
proc_ctx.set(None)
|
proc_ctx.set(None)
|
||||||
|
|
||||||
|
|
||||||
async def initialize_executor(workers, db_dir='/media/jack/evo970/spv_data', for_sync=False, name='lbryrocks'):
|
async def initialize_executor(workers, db_dir, for_sync, name):
|
||||||
executor = ProcessPoolExecutor(workers, initializer=_initializer, initargs=(db_dir, name))
|
executor = ProcessPoolExecutor(workers, initializer=_initializer, initargs=(db_dir, name))
|
||||||
try:
|
try:
|
||||||
writer = RocksDB(db_dir, name, for_sync=for_sync, read_only=False)
|
writer = RocksDB(db_dir, name, for_sync=for_sync, read_only=False)
|
||||||
|
|
Loading…
Add table
Reference in a new issue