Skip to content

Commit ff92b22

Browse files
Scope discriminant size temporaries to InitSession locals.
Keep disc_size and disc_int_size local to reduce exported header globals and make InitSession-owned state explicit. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent b2dc9c2 commit ff92b22

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/vdf_client_session.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@
99
#include <string>
1010

1111
inline char disc[350];
12-
inline char disc_size[5];
13-
inline int disc_int_size;
1412
inline uint8_t initial_form_s[BQFC_FORM_SIZE];
1513

1614
inline void InitSession(boost::asio::ip::tcp::socket& sock) {
1715
boost::system::error_code error;
16+
char disc_size[5];
17+
int disc_int_size;
1818
auto check_read_error = [&](const char* field_name) {
1919
if (error == boost::asio::error::eof) {
2020
throw std::runtime_error(std::string("Connection closed while reading ") + field_name);

0 commit comments

Comments
 (0)