allow lmdb_to_mdbx create buckets

This commit is contained in:
alex.sharov 2021-05-28 08:54:23 +07:00
parent 5d6305952a
commit e4ee6a1f5b

View File

@ -405,7 +405,7 @@ MainLoop:
func lmdbToMdbx(ctx context.Context, from, to string) error { func lmdbToMdbx(ctx context.Context, from, to string) error {
_ = os.RemoveAll(to) _ = os.RemoveAll(to)
src := ethdb.NewLMDB().Path(from).Flags(func(flags uint) uint { return (flags | lmdb.Readonly) ^ lmdb.NoReadahead }).MustOpen() src := ethdb.NewLMDB().Path(from).MustOpen()
dst := ethdb.NewMDBX().Path(to).MustOpen() dst := ethdb.NewMDBX().Path(to).MustOpen()
return kv2kv(ctx, src, dst) return kv2kv(ctx, src, dst)
} }