test-db.h 452 B

12345678910111213141516171819202122232425
  1. // SPDX-License-Identifier: GPL-3.0-or-later
  2. // SPDX-FileCopyrightText: 2019-2022 Ivan Baidakou
  3. #pragma once
  4. #include "db/utils.h"
  5. #include <boost/filesystem.hpp>
  6. namespace syncspirit::test {
  7. namespace bfs = boost::filesystem;
  8. namespace db = syncspirit::db;
  9. struct env_t {
  10. MDBX_env *env;
  11. bfs::path path;
  12. ~env_t();
  13. };
  14. env_t mk_env();
  15. db::transaction_t mk_txn(env_t &env, db::transaction_type_t type);
  16. } // namespace syncspirit::test