| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Cardano.Tools.LeiosDb
Synopsis
- data LeiosDbSource
- requireLeiosDbFile ∷ FilePath → IO ()
Documentation
data LeiosDbSource Source #
Which LeiosDb the tool works on, per --leios-db and --no-leios-db.
Constructors
| LeiosDbFiles | The LeiosDb file, derived from |
| NoLeiosDb | No file. db-analyser uses an empty in-memory LeiosDb, and db-truncater skips every LeiosDb step. |
The path of the LeiosDb file. Dies if that file does not exist.
The path to LeiosDB's volatile/immutable partition files must exist. Tools such as db-analyser, db-truncater and other infer these path from the '--db' option by appending the default names.
A missing file is fatal, because a tool cannot tell whether the chain holds a
cert-RB before it reads the chain. The operator passes --no-leios-db to say
that the chain holds no cert-RB.
Hence this check, rather than a check inside the SQLite backend: that backend
opens with SQLOpenCreate and it creates the schema when it finds no file.
So without this check the tool would write an empty leios.vol.db/leios.imm.db into the node's
directory and fail only at the first cert-RB.