<!--
{
  "availability" : [

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

# setBlockTreeDBInMemory(_:)

Keeps the block-index database in RAM instead of on disk.

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

## Parameters

`inMemory`

`true` to use an in-memory block-index DB.

## Discussion

Used by swift-bitcoinkernel’s test suite — see the regtest chainstate
fixtures in `ChainstateManagerTests`. In production, leave disabled
so the index survives process restart.