aboutsummaryrefslogtreecommitdiff
path: root/src/flatfile.cpp
AgeCommit message (Collapse)Author
2021-10-05refactor: Block unsafe fs::path std::string conversion callsRussell Yanofsky
There is no change in behavior. This just helps prepare for the transition from boost::filesystem to std::filesystem by avoiding calls to methods which will be unsafe after the transaction to std::filesystem to due lack of a boost::filesystem::path::imbue equivalent and inability to set a predictable locale. Co-authored-by: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Co-authored-by: Kiminuo <kiminuo@protonmail.com> Co-authored-by: MarcoFalke <falke.marco@gmail.com>
2021-02-10log: Move "Pre-allocating up to position 0x[...] in [...].dat" log message ↵practicalswift
to debug category
2020-08-25Fix possible data race when committing block filesEvan Klitzke
It was recently pointed out to me that calling fsync() or fdatasync() on a new file is not sufficient to ensure it's persisted to disk, a the existence of the file itself is stored in the directory inode. This means that ensuring that a new file is actually committed also requires an fsync() on the parent directory. This change ensures that we call fsync() on the blocks directory after committing new block files.
2019-02-22Style cleanup.Jim Posen
2019-02-22scripted-diff: Rename CBlockDiskPos to FlatFilePos.Jim Posen
-BEGIN VERIFY SCRIPT- sed -i 's/CDiskBlockPos/FlatFilePos/g' $(git ls-files 'src/*.h' 'src/*.cpp') -END VERIFY SCRIPT-
2019-02-22Move CDiskBlockPos from chain to flatfile.Jim Posen
2019-02-22validation: Refactor file flush logic into FlatFileSeq.Jim Posen
2019-02-22validation: Refactor block file pre-allocation into FlatFileSeq.Jim Posen
2019-02-22validation: Refactor OpenDiskFile into method on FlatFileSeq.Jim Posen
2019-02-22validation: Extract basic block file logic into FlatFileSeq class.Jim Posen