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:
copilot-swe-agent[bot]
2026-04-24 13:52:06 +00:00
committed by GitHub
parent ff4c538a9f
commit 28143d74af

View File

@@ -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());