mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
Move CDiskBlockPos from chain to flatfile.
This commit is contained in:
parent
e0380933e3
commit
d6d8a78f26
3 changed files with 49 additions and 43 deletions
|
|
@ -1,4 +1,5 @@
|
|||
// Copyright (c) 2019 The Bitcoin Core developers
|
||||
// Copyright (c) 2009-2010 Satoshi Nakamoto
|
||||
// Copyright (c) 2009-2019 The Bitcoin Core developers
|
||||
// Distributed under the MIT software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
|
|
@ -19,6 +20,11 @@ FlatFileSeq::FlatFileSeq(fs::path dir, const char* prefix, size_t chunk_size) :
|
|||
}
|
||||
}
|
||||
|
||||
std::string CDiskBlockPos::ToString() const
|
||||
{
|
||||
return strprintf("CDiskBlockPos(nFile=%i, nPos=%i)", nFile, nPos);
|
||||
}
|
||||
|
||||
fs::path FlatFileSeq::FileName(const CDiskBlockPos& pos) const
|
||||
{
|
||||
return m_dir / strprintf("%s%05u.dat", m_prefix, pos.nFile);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue