Instance Method
setWipeDBs(blockTreeDB:chainstateDB:)
Configures database wiping for reindex operations.
@discardableResult func setWipeDBs(blockTreeDB: Bool, chainstateDB: Bool) -> Bool
Parameters
-
blockTreeDB
-
Whether to wipe the block-index database.
-
chainstateDB
-
Whether to wipe the chainstate (UTXO) database.
Return Value
true if the configuration succeeded.
Discussion
Wiping forces the next ChainstateManager start to rebuild from scratch — useful for recovering from local DB corruption or for applying new validation flags to a previously-validated chain. Wiping only the chainstate DB (chainstateDB: true, blockTreeDB: false) is the equivalent of Bitcoin Core’s -reindex-chainstate; wiping both is the equivalent of -reindex.