Skip to content

Commit

Permalink
Fix typos.
Browse files Browse the repository at this point in the history
  • Loading branch information
fchirica authored May 5, 2020
1 parent 233045b commit 2e802d7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/vdf_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@ int thread_count = 3;

void PrintInfo(std::string input) {
std::cout << "VDF Client: " << input << "\n";
std::cout << std::flush;
}

char disc[350];
char disc_size[5];
int disc_int_size = atoi(disc_size);
int disc_int_size;

void WriteProof(uint64_t iteration, Proof& result, tcp::socket& sock) {
// Writes the number of iterations
Expand Down Expand Up @@ -65,6 +66,7 @@ void InitSession(tcp::socket& sock) {
memset(disc_size,0x00,sizeof(disc_size)); // For null termination

boost::asio::read(sock, boost::asio::buffer(disc_size, 3), error);
disc_int_size = atoi(disc_size);
boost::asio::read(sock, boost::asio::buffer(disc, disc_int_size), error);

if (error == boost::asio::error::eof)
Expand Down Expand Up @@ -170,6 +172,9 @@ void SessionOneWeso(tcp::socket& sock) {
WesolowskiCallback weso(0, D);
PrintInfo("Discriminant = " + to_string(D.impl));

// Tell client that I'm ready to get the challenges.
boost::asio::write(sock, boost::asio::buffer("OK", 2));

uint64_t iter = ReadIteration(sock);
weso.wanted_iter = iter;
uint64_t k, l;
Expand Down

0 comments on commit 2e802d7

Please sign in to comment.