Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suffix user agent with slash #96

Closed
rithvikvibhu opened this issue Aug 11, 2022 · 0 comments
Closed

Suffix user agent with slash #96

rithvikvibhu opened this issue Aug 11, 2022 · 0 comments

Comments

@rithvikvibhu
Copy link
Member

Not a big deal, but hnsd user agents don't end with a slash. This was added in hnsd (#81) last year (before hsd handshake-org/hsd#710 a few months ago) and hence the difference.

Taken from a node peer list:

{
  "/hnsd:1.0.0/": 474,
  "/hnsd:1.0.0/beacon": 2,
  "/hsd:4.0.0/": 4,
  "/hsd:4.0.1/bob-wallet:1.0.0/": 1,
  "/hsd:4.0.2/": 7,
}

I think this needs to change?

hnsd/src/pool.c

Lines 305 to 312 in 856ee22

size_t len = strlen(pool->user_agent);
len += strlen(user_agent);
// Agent size in p2p version message is 1 byte
if (len > 0xff)
return false;
pool->user_agent = strcat(pool->user_agent, user_agent);

@pinheadmz pinheadmz added this to the v2.0.0 milestone Oct 24, 2022
@pinheadmz pinheadmz removed this from the v2.0.0 milestone Oct 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants