mirror of
https://github.com/akula-bft/akula.git
synced 2026-04-19 03:00:13 -04:00
MDBX: require at least 1 dbi slot
This commit is contained in:
@@ -37,9 +37,7 @@ impl<E: EnvironmentKind> Environment<E> {
|
||||
chart: DatabaseChart,
|
||||
ro: bool,
|
||||
) -> anyhow::Result<Self> {
|
||||
if !chart.is_empty() {
|
||||
b.set_max_dbs(chart.len());
|
||||
}
|
||||
b.set_max_dbs(std::cmp::max(chart.len(), 1));
|
||||
if ro {
|
||||
b.set_flags(::mdbx::EnvironmentFlags {
|
||||
mode: ::mdbx::Mode::ReadOnly,
|
||||
|
||||
Reference in New Issue
Block a user