mirror of
https://github.com/Xahau/xahaud.git
synced 2026-01-28 02:25:19 +00:00
Compare commits
5 Commits
export
...
test-hook-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
335dcb1351 | ||
|
|
c355ad9971 | ||
|
|
5d9071695a | ||
|
|
a8d7b2619e | ||
|
|
775fb3a8b2 |
12
.github/workflows/xahau-ga-macos.yml
vendored
12
.github/workflows/xahau-ga-macos.yml
vendored
@@ -43,14 +43,22 @@ jobs:
|
|||||||
# To isolate environments for each Runner, instead of installing globally with brew,
|
# To isolate environments for each Runner, instead of installing globally with brew,
|
||||||
# use mise to isolate environments for each Runner directory.
|
# use mise to isolate environments for each Runner directory.
|
||||||
- name: Setup toolchain (mise)
|
- name: Setup toolchain (mise)
|
||||||
uses: jdx/mise-action@v2
|
uses: jdx/mise-action@v3.6.1
|
||||||
with:
|
with:
|
||||||
|
cache: false
|
||||||
install: true
|
install: true
|
||||||
|
mise_toml: |
|
||||||
|
[tools]
|
||||||
|
cmake = "3.23.1"
|
||||||
|
python = "3.12"
|
||||||
|
pipx = "latest"
|
||||||
|
conan = "2"
|
||||||
|
ninja = "latest"
|
||||||
|
ccache = "latest"
|
||||||
|
|
||||||
- name: Install tools via mise
|
- name: Install tools via mise
|
||||||
run: |
|
run: |
|
||||||
mise install
|
mise install
|
||||||
mise use cmake@3.23.1 python@3.12 pipx@latest conan@2 ninja@latest ccache@latest
|
|
||||||
mise reshim
|
mise reshim
|
||||||
echo "$HOME/.local/share/mise/shims" >> "$GITHUB_PATH"
|
echo "$HOME/.local/share/mise/shims" >> "$GITHUB_PATH"
|
||||||
|
|
||||||
|
|||||||
@@ -471,6 +471,10 @@ ManifestCache::applyManifest(Manifest m)
|
|||||||
|
|
||||||
auto masterKey = m.masterKey;
|
auto masterKey = m.masterKey;
|
||||||
map_.emplace(std::move(masterKey), std::move(m));
|
map_.emplace(std::move(masterKey), std::move(m));
|
||||||
|
|
||||||
|
// Increment sequence to invalidate cached manifest messages
|
||||||
|
seq_++;
|
||||||
|
|
||||||
return ManifestDisposition::accepted;
|
return ManifestDisposition::accepted;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -484,44 +484,61 @@ OverlayImpl::start()
|
|||||||
m_peerFinder->setConfig(config);
|
m_peerFinder->setConfig(config);
|
||||||
m_peerFinder->start();
|
m_peerFinder->start();
|
||||||
|
|
||||||
auto addIps = [&](std::vector<std::string> bootstrapIps) -> void {
|
auto addIps = [this](std::vector<std::string> ips, bool fixed) {
|
||||||
beast::Journal const& j = app_.journal("Overlay");
|
beast::Journal const& j = app_.journal("Overlay");
|
||||||
for (auto& ip : bootstrapIps)
|
for (auto& ip : ips)
|
||||||
{
|
{
|
||||||
std::size_t pos = ip.find('#');
|
std::size_t pos = ip.find('#');
|
||||||
if (pos != std::string::npos)
|
if (pos != std::string::npos)
|
||||||
ip.erase(pos);
|
ip.erase(pos);
|
||||||
|
|
||||||
JLOG(j.trace()) << "Found boostrap IP: " << ip;
|
JLOG(j.trace())
|
||||||
|
<< "Found " << (fixed ? "fixed" : "bootstrap") << " IP: " << ip;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_resolver.resolve(
|
m_resolver.resolve(
|
||||||
bootstrapIps,
|
ips,
|
||||||
[&](std::string const& name,
|
[this, fixed](
|
||||||
|
std::string const& name,
|
||||||
std::vector<beast::IP::Endpoint> const& addresses) {
|
std::vector<beast::IP::Endpoint> const& addresses) {
|
||||||
std::vector<std::string> ips;
|
|
||||||
ips.reserve(addresses.size());
|
|
||||||
beast::Journal const& j = app_.journal("Overlay");
|
beast::Journal const& j = app_.journal("Overlay");
|
||||||
|
std::string const base("config: ");
|
||||||
|
|
||||||
|
std::vector<beast::IP::Endpoint> eps;
|
||||||
|
eps.reserve(addresses.size());
|
||||||
for (auto const& addr : addresses)
|
for (auto const& addr : addresses)
|
||||||
{
|
{
|
||||||
std::string addrStr = addr.port() == 0
|
auto ep = addr.port() == 0 ? addr.at_port(DEFAULT_PEER_PORT)
|
||||||
? to_string(addr.at_port(DEFAULT_PEER_PORT))
|
: addr;
|
||||||
: to_string(addr);
|
JLOG(j.trace())
|
||||||
JLOG(j.trace()) << "Parsed boostrap IP: " << addrStr;
|
<< "Parsed " << (fixed ? "fixed" : "bootstrap")
|
||||||
ips.push_back(addrStr);
|
<< " IP: " << ep;
|
||||||
|
eps.push_back(ep);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string const base("config: ");
|
if (eps.empty())
|
||||||
if (!ips.empty())
|
return;
|
||||||
m_peerFinder->addFallbackStrings(base + name, ips);
|
|
||||||
|
if (fixed)
|
||||||
|
{
|
||||||
|
m_peerFinder->addFixedPeer(base + name, eps);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
std::vector<std::string> 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())
|
if (!app_.config().IPS.empty())
|
||||||
addIps(app_.config().IPS);
|
addIps(app_.config().IPS, false);
|
||||||
|
|
||||||
if (!app_.config().IPS_FIXED.empty())
|
if (!app_.config().IPS_FIXED.empty())
|
||||||
addIps(app_.config().IPS_FIXED);
|
addIps(app_.config().IPS_FIXED, true);
|
||||||
|
|
||||||
auto const timer = std::make_shared<Timer>(*this);
|
auto const timer = std::make_shared<Timer>(*this);
|
||||||
std::lock_guard lock(mutex_);
|
std::lock_guard lock(mutex_);
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user