mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-23 07:15:29 +01:00
init: lock blocksdir in addition to datadir
This guards against 2 processes running with separate datadirs but the same blocksdir. It's not likely to happen currently, but may be more relevant in the future with applications using the kernel. Note that the kernel does not currently do any dir locking, but it should.
This commit is contained in:
parent
cabb2e5c24
commit
bdc0a68e67
1 changed files with 2 additions and 1 deletions
|
@ -1086,7 +1086,8 @@ static bool LockDirectory(const fs::path& dir, bool probeOnly)
|
|||
}
|
||||
static bool LockDirectories(bool probeOnly)
|
||||
{
|
||||
return LockDirectory(gArgs.GetDataDirNet(), probeOnly);
|
||||
return LockDirectory(gArgs.GetDataDirNet(), probeOnly) && \
|
||||
LockDirectory(gArgs.GetBlocksDirPath(), probeOnly);
|
||||
}
|
||||
|
||||
bool AppInitSanityChecks(const kernel::Context& kernel)
|
||||
|
|
Loading…
Add table
Reference in a new issue