Skip to content

Commit

Permalink
Merge pull request #225 from AmineKhaldi/upgrade_from_io_service_to_i…
Browse files Browse the repository at this point in the history
…o_context

CHIA-2095 Upgrade vdf_client's boost asio io_service code to using io_context
  • Loading branch information
emlowe authored Dec 18, 2024
2 parents ca4cec3 + 5734efd commit df12f6c
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/vdf_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -322,14 +322,13 @@ int main(int argc, char* argv[]) try {
gcd_128_max_iter = 2;
}

boost::asio::io_service io_service;
boost::asio::io_context io_context;

tcp::resolver resolver(io_service);
tcp::resolver::query query(tcp::v6(), argv[1], argv[2], boost::asio::ip::resolver_query_base::v4_mapped);
tcp::resolver::iterator iterator = resolver.resolve(query);
tcp::resolver resolver(io_context);
tcp::resolver::results_type endpoints = resolver.resolve(tcp::v6(), argv[1], argv[2], boost::asio::ip::resolver_query_base::v4_mapped);

tcp::socket s(io_service);
boost::asio::connect(s, iterator);
tcp::socket s(io_context);
boost::asio::connect(s, endpoints);
fast_algorithm = false;
two_weso = false;
boost::system::error_code error;
Expand Down

0 comments on commit df12f6c

Please sign in to comment.