mirror of
https://github.com/XRPLF/rippled.git
synced 2026-04-29 15:37:57 +00:00
Increase entropy in SHAMapStoreImp.cpp unique path generation
Agent-Logs-Url: https://github.com/XRPLF/rippled/sessions/ec2fa57d-2d9c-4388-b4e1-90a40f55b5e8 Co-authored-by: mvadari <8029314+mvadari@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
ff4c538a9f
commit
28143d74af
@@ -475,7 +475,7 @@ SHAMapStoreImp::makeBackendRotating(std::string path)
|
||||
std::filesystem::path const p = get(section, "path");
|
||||
std::random_device rd;
|
||||
std::ostringstream oss;
|
||||
oss << std::hex << std::setfill('0') << std::setw(8) << rd();
|
||||
oss << std::hex << std::setfill('0') << std::setw(8) << rd() << std::setw(8) << rd();
|
||||
newPath = (p / dbPrefix_).string() + "." + oss.str();
|
||||
}
|
||||
section.set("path", newPath.string());
|
||||
|
||||
Reference in New Issue
Block a user