<!--
{
  "availability" : [

  ],
  "documentType" : "symbol",
  "framework" : "BitcoinKernel",
  "identifier" : "/documentation/BitcoinKernel/ChainstateManagerOptions/setWipeDBs(blockTreeDB:chainstateDB:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "BitcoinKernel"
    ],
    "preciseIdentifier" : "s:13BitcoinKernel24ChainstateManagerOptionsC10setWipeDBs11blockTreeDB010chainstateK0S2b_SbtF"
  },
  "title" : "setWipeDBs(blockTreeDB:chainstateDB:)"
}
-->

# 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`](/documentation/BitcoinKernel/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`.