diff options
Diffstat (limited to 'src/flatfile.h')
-rw-r--r-- | src/flatfile.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/flatfile.h b/src/flatfile.h index 1b5d83e8e6..eea41ddf84 100644 --- a/src/flatfile.h +++ b/src/flatfile.h @@ -45,6 +45,15 @@ public: * @return The number of bytes successfully allocated. */ size_t Allocate(const CDiskBlockPos& pos, size_t add_size, bool& out_of_space); + + /** + * Commit a file to disk, and optionally truncate off extra pre-allocated bytes if final. + * + * @param[in] pos The first unwritten position in the file to be flushed. + * @param[in] finalize True if no more data will be written to this file. + * @return true on success, false on failure. + */ + bool Flush(const CDiskBlockPos& pos, bool finalize = false); }; #endif // BITCOIN_FLATFILE_H |