mirror of
https://github.com/status-im/nimbus-eth2.git
synced 2025-02-23 03:38:21 +00:00
Revert "increase sqlite cache size (#2607)"
This reverts commit f55c4bc40238be7fa6f0ad658bef38e8489a6d97.
This commit is contained in:
parent
f55c4bc402
commit
5be1f8bf93
@ -19,10 +19,6 @@ import
|
||||
|
||||
logScope: topics = "bc_db"
|
||||
|
||||
const
|
||||
# Negative cache size to make sqlite use kilobytes
|
||||
cacheSize = -24 * 1024 # 24mb
|
||||
|
||||
type
|
||||
DbSeq*[T] = object
|
||||
insertStmt: SqliteStmt[openArray[byte], void]
|
||||
@ -276,11 +272,8 @@ proc new*(T: type BeaconChainDB,
|
||||
|
||||
# Remove the deposits table we used before we switched
|
||||
# to storing only deposit contract checkpoints
|
||||
if (let e = db.exec("DROP TABLE IF EXISTS deposits;"); e.isErr):
|
||||
warn "Failed to drop the deposits table", msg = e.error()
|
||||
|
||||
if (let e = db.exec("PRAGMA cache_size=" & $cacheSize & ";"); e.isErr):
|
||||
warn "Failed to set cache size", msg = e.error()
|
||||
if db.exec("DROP TABLE IF EXISTS deposits;").isErr:
|
||||
debug "Failed to drop the deposits table"
|
||||
|
||||
# An old pubkey->index mapping that hasn't been used on any mainnet release
|
||||
if db.exec("DROP TABLE IF EXISTS validatorIndexFromPubKey;").isErr:
|
||||
|
Loading…
x
Reference in New Issue
Block a user