<!--
{
  "availability" : [

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

# setChainstateDBInMemory(_:)

Keeps the chainstate (UTXO) database in RAM instead of on disk.

```
func setChainstateDBInMemory(_ inMemory: Bool)
```

## Parameters

`inMemory`

`true` to use an in-memory chainstate DB.

## Discussion

Test-oriented; pairs with [`setBlockTreeDBInMemory(_:)`](/documentation/BitcoinKernel/ChainstateManagerOptions/setBlockTreeDBInMemory(_:)) to make a
completely ephemeral chainstate that evaporates at process exit.
Not suitable for production — the UTXO set must survive restart.