diff options
author | James O'Beirne <james.obeirne@pm.me> | 2022-02-01 16:22:00 -0500 |
---|---|---|
committer | James O'Beirne <james.obeirne@pm.me> | 2022-09-13 12:38:06 -0400 |
commit | d14bebf100aaaa25c7558eeed8b5c536da99885f (patch) | |
tree | ccebf20faa56670c317a72ff1af1debe9eba7e42 /src/txdb.h | |
parent | 29d540b7ada890dd588c4825d40c27c5e6f20061 (diff) |
db: add StoragePath to CDBWrapper/CCoinsViewDB
This is used in subsequent commits. It allows us to clean up UTXO
snapshot chainstate after background validation completes.
Diffstat (limited to 'src/txdb.h')
-rw-r--r-- | src/txdb.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/txdb.h b/src/txdb.h index a04596f7bb..8c41e26f6a 100644 --- a/src/txdb.h +++ b/src/txdb.h @@ -9,6 +9,7 @@ #include <coins.h> #include <dbwrapper.h> #include <sync.h> +#include <fs.h> #include <memory> #include <optional> @@ -72,6 +73,9 @@ public: //! Dynamically alter the underlying leveldb cache size. void ResizeCache(size_t new_cache_size) EXCLUSIVE_LOCKS_REQUIRED(cs_main); + + //! @returns filesystem path to on-disk storage or std::nullopt if in memory. + std::optional<fs::path> StoragePath() { return m_db->StoragePath(); } }; /** Access to the block database (blocks/index/) */ |