add transaction_cache_size
to config
This commit is contained in:
parent
7f6b2fe4f1
commit
cae7792a1e
3 changed files with 3 additions and 1 deletions
|
@ -636,6 +636,7 @@ class Config(CLIConfig):
|
||||||
"Strategy to use when selecting UTXOs for a transaction",
|
"Strategy to use when selecting UTXOs for a transaction",
|
||||||
STRATEGIES, "standard")
|
STRATEGIES, "standard")
|
||||||
|
|
||||||
|
transaction_cache_size = Integer("Transaction cache size", 100_000)
|
||||||
save_resolved_claims = Toggle(
|
save_resolved_claims = Toggle(
|
||||||
"Save content claims to the database when they are resolved to keep file_list up to date, "
|
"Save content claims to the database when they are resolved to keep file_list up to date, "
|
||||||
"only disable this if file_x commands are not needed", True
|
"only disable this if file_x commands are not needed", True
|
||||||
|
|
|
@ -158,7 +158,7 @@ class Ledger(metaclass=LedgerRegistry):
|
||||||
self._on_ready_controller = StreamController()
|
self._on_ready_controller = StreamController()
|
||||||
self.on_ready = self._on_ready_controller.stream
|
self.on_ready = self._on_ready_controller.stream
|
||||||
|
|
||||||
self._tx_cache = pylru.lrucache(100000)
|
self._tx_cache = pylru.lrucache(self.config.get("tx_cache_size", 100_000))
|
||||||
self._update_tasks = TaskGroup()
|
self._update_tasks = TaskGroup()
|
||||||
self._other_tasks = TaskGroup() # that we dont need to start
|
self._other_tasks = TaskGroup() # that we dont need to start
|
||||||
self._utxo_reservation_lock = asyncio.Lock()
|
self._utxo_reservation_lock = asyncio.Lock()
|
||||||
|
|
|
@ -184,6 +184,7 @@ class WalletManager:
|
||||||
'auto_connect': True,
|
'auto_connect': True,
|
||||||
'default_servers': config.lbryum_servers,
|
'default_servers': config.lbryum_servers,
|
||||||
'data_path': config.wallet_dir,
|
'data_path': config.wallet_dir,
|
||||||
|
'tx_cache_size': config.transaction_cache_size
|
||||||
}
|
}
|
||||||
|
|
||||||
wallets_directory = os.path.join(config.wallet_dir, 'wallets')
|
wallets_directory = os.path.join(config.wallet_dir, 'wallets')
|
||||||
|
|
Loading…
Add table
Reference in a new issue