From 94e5325ba92f91083e5067bc2cfb2c20b916b50e Mon Sep 17 00:00:00 2001 From: tequ Date: Wed, 17 Dec 2025 12:53:20 +0900 Subject: [PATCH] Update CMake version to 3.25.3 in macOS workflow --- .../actions/xahau-ga-dependencies/action.yml | 15 ++++-- .github/workflows/xahau-ga-macos.yml | 12 ++++- src/xrpld/app/misc/detail/Manifest.cpp | 4 ++ src/xrpld/overlay/detail/OverlayImpl.cpp | 51 ++++++++++++------- 4 files changed, 59 insertions(+), 23 deletions(-) diff --git a/.github/actions/xahau-ga-dependencies/action.yml b/.github/actions/xahau-ga-dependencies/action.yml index 376448ff6..8da022fe5 100644 --- a/.github/actions/xahau-ga-dependencies/action.yml +++ b/.github/actions/xahau-ga-dependencies/action.yml @@ -134,10 +134,17 @@ runs: - name: Export custom recipes shell: bash run: | - conan export external/snappy --version 1.1.10 --user xahaud --channel stable - conan export external/soci --version 4.0.3 --user xahaud --channel stable - conan export external/wasmedge --version 0.11.2 --user xahaud --channel stable - + # Export snappy if not already exported + conan list snappy/1.1.10@xahaud/stable 2>/dev/null | (grep -q "not found" && exit 1 || exit 0) || \ + conan export external/snappy --version 1.1.10 --user xahaud --channel stable + + # Export soci if not already exported + conan list soci/4.0.3@xahaud/stable 2>/dev/null | (grep -q "not found" && exit 1 || exit 0) || \ + conan export external/soci --version 4.0.3 --user xahaud --channel stable + + # Export wasmedge if not already exported + conan list wasmedge/0.11.2@xahaud/stable 2>/dev/null | (grep -q "not found" && exit 1 || exit 0) || \ + conan export external/wasmedge --version 0.11.2 --user xahaud --channel stable - name: Install dependencies shell: bash env: diff --git a/.github/workflows/xahau-ga-macos.yml b/.github/workflows/xahau-ga-macos.yml index 8615a773a..072d1244e 100644 --- a/.github/workflows/xahau-ga-macos.yml +++ b/.github/workflows/xahau-ga-macos.yml @@ -43,14 +43,22 @@ jobs: # To isolate environments for each Runner, instead of installing globally with brew, # use mise to isolate environments for each Runner directory. - name: Setup toolchain (mise) - uses: jdx/mise-action@v2 + uses: jdx/mise-action@v3.6.1 with: + cache: false install: true + mise_toml: | + [tools] + cmake = "3.25.3" + python = "3.12" + pipx = "latest" + conan = "2" + ninja = "latest" + ccache = "latest" - name: Install tools via mise run: | mise install - mise use cmake@3.23.1 python@3.12 pipx@latest conan@2 ninja@latest ccache@latest mise reshim echo "$HOME/.local/share/mise/shims" >> "$GITHUB_PATH" diff --git a/src/xrpld/app/misc/detail/Manifest.cpp b/src/xrpld/app/misc/detail/Manifest.cpp index d719d2b9c..203b29298 100644 --- a/src/xrpld/app/misc/detail/Manifest.cpp +++ b/src/xrpld/app/misc/detail/Manifest.cpp @@ -501,6 +501,10 @@ ManifestCache::applyManifest(Manifest m) auto masterKey = m.masterKey; map_.emplace(std::move(masterKey), std::move(m)); + + // Increment sequence to invalidate cached manifest messages + seq_++; + return ManifestDisposition::accepted; } diff --git a/src/xrpld/overlay/detail/OverlayImpl.cpp b/src/xrpld/overlay/detail/OverlayImpl.cpp index b6ff3d6f8..f153f0df0 100644 --- a/src/xrpld/overlay/detail/OverlayImpl.cpp +++ b/src/xrpld/overlay/detail/OverlayImpl.cpp @@ -490,44 +490,61 @@ OverlayImpl::start() m_peerFinder->setConfig(config); m_peerFinder->start(); - auto addIps = [&](std::vector bootstrapIps) -> void { + auto addIps = [this](std::vector ips, bool fixed) { beast::Journal const& j = app_.journal("Overlay"); - for (auto& ip : bootstrapIps) + for (auto& ip : ips) { std::size_t pos = ip.find('#'); if (pos != std::string::npos) ip.erase(pos); - JLOG(j.trace()) << "Found boostrap IP: " << ip; + JLOG(j.trace()) + << "Found " << (fixed ? "fixed" : "bootstrap") << " IP: " << ip; } m_resolver.resolve( - bootstrapIps, - [&](std::string const& name, + ips, + [this, fixed]( + std::string const& name, std::vector const& addresses) { - std::vector ips; - ips.reserve(addresses.size()); beast::Journal const& j = app_.journal("Overlay"); + std::string const base("config: "); + + std::vector eps; + eps.reserve(addresses.size()); for (auto const& addr : addresses) { - std::string addrStr = addr.port() == 0 - ? to_string(addr.at_port(DEFAULT_PEER_PORT)) - : to_string(addr); - JLOG(j.trace()) << "Parsed boostrap IP: " << addrStr; - ips.push_back(addrStr); + auto ep = addr.port() == 0 ? addr.at_port(DEFAULT_PEER_PORT) + : addr; + JLOG(j.trace()) + << "Parsed " << (fixed ? "fixed" : "bootstrap") + << " IP: " << ep; + eps.push_back(ep); } - std::string const base("config: "); - if (!ips.empty()) - m_peerFinder->addFallbackStrings(base + name, ips); + if (eps.empty()) + return; + + if (fixed) + { + m_peerFinder->addFixedPeer(base + name, eps); + } + else + { + std::vector strs; + strs.reserve(eps.size()); + for (auto const& ep : eps) + strs.push_back(to_string(ep)); + m_peerFinder->addFallbackStrings(base + name, strs); + } }); }; if (!app_.config().IPS.empty()) - addIps(app_.config().IPS); + addIps(app_.config().IPS, false); if (!app_.config().IPS_FIXED.empty()) - addIps(app_.config().IPS_FIXED); + addIps(app_.config().IPS_FIXED, true); auto const timer = std::make_shared(*this); std::lock_guard lock(mutex_);