Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/compile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ jobs:
preset: [default]
include:
- toolchain: gcc
docker: 1.234.1
docker: 1.237.0
compiler: gcc
- toolchain: clang
docker: 1.234.1
docker: 1.237.0
compiler: clang
steps:
- name: Checkout opentxs
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
fail-fast: false
env:
docker: '1.234.1'
docker: '1.237.0'
steps:
- name: Checkout opentxs
uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/iwyu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
fail-fast: false
env:
docker: '1.234.1'
docker: '1.237.0'
steps:
- name: Checkout opentxs
uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ otcommon_print_build_details(METIER_SERVER_PEDANTIC_BUILD "")
otcommon_find_system_libraries()
find_package(
opentxs
1.234
1.237
CONFIG
REQUIRED
)
Expand Down
14 changes: 9 additions & 5 deletions src/metier_server/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ using namespace std::literals;
#pragma GCC diagnostic pop

using Type = opentxs::blockchain::Type;
using Enabled = opentxs::Map<Type, opentxs::UnallocatedString>;
using Enabled = opentxs::Set<Type>;
using Disabled = opentxs::Set<Type>;

constexpr auto all_{"all"};
Expand All @@ -49,6 +49,7 @@ auto lower(opentxs::UnallocatedString& str) noexcept
auto parse(
opentxs::UnallocatedString const& input,
Type const type,
opentxs::api::Options& args,
Enabled& enabled,
Disabled& disabled) noexcept -> void;
auto process_arguments(Options& opts, int argc, char** argv) noexcept -> void;
Expand Down Expand Up @@ -95,8 +96,8 @@ auto main(int argc, char* argv[]) -> int
opentxs::blockchain::Type,
opentxs::NaturalCaseCompare>{};

for (auto const& [chain, seed] : opts.enabled_chains_) {
if (client.Network().Blockchain().Enable(chain, seed)) {
for (auto const& chain : opts.enabled_chains_) {
if (client.Network().Blockchain().Enable(chain)) {
out.try_emplace(opentxs::blockchain::print(chain), chain);
} else {

Expand Down Expand Up @@ -261,6 +262,7 @@ auto options() noexcept -> boost::program_options::options_description const&
auto parse(
opentxs::UnallocatedString const& input,
Type const type,
opentxs::api::Options& args,
Enabled& enabled,
Disabled& disabled) noexcept -> void
{
Expand All @@ -270,7 +272,8 @@ auto parse(
disabled.emplace(type);
enabled.erase(type);
} else if (0u == disabled.count(type)) {
enabled[type] = input;
enabled.emplace(type);
args.AddBlockchainNativePeer(type, input);
}
}

Expand Down Expand Up @@ -321,7 +324,7 @@ auto process_arguments(Options& opts, int argc, char** argv) noexcept -> void
} else if (name == all_) {
for (auto const chain : allChains) {
if (0u == disabled.count(chain)) {
opts.enabled_chains_[chain];
opts.enabled_chains_.emplace(chain);
}
}
} else if (name == home_) {
Expand All @@ -348,6 +351,7 @@ auto process_arguments(Options& opts, int argc, char** argv) noexcept -> void
parse(
value.as<opentxs::UnallocatedString>(),
chain,
otargs,
enabled,
disabled);
} catch (...) {
Expand Down
Loading