Skip to content

add --agent pool option #164

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

Merged
merged 2 commits into from
Jan 9, 2025
Merged

Conversation

handshake-enthusiast
Copy link
Contributor

No description provided.

@@ -91,6 +91,7 @@ Note that certain chain options affect the format and indexing of the chain data

### Pool Options

- `agent`: Custom user agent (default: /hsd:version/). Must be not more than 255 characters long.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agent doesn't replace the full user agent. It adds what's provided after /hsd:version/

Example: --agent bob-wallet:2.0.0 will make it /hsd:5.0.1/bob-wallet:2.0.0/

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, I know. How would you concisely rephrase this?
It's not said that this setting replaces the default, so seems to be correct, just not "complete".

Copy link
Member

@rithvikvibhu rithvikvibhu Mar 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stealing it from bitcoin core: https://github.com/bitcoin/bitcoin/blob/40e1c4d4024b8ad35f2511b2e10bf80c5531dfde/src/init.cpp#L574

And if a default is specified, it should probably be ""

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea.

In Bitcoin Core it says "Append comment to the user agent string".

Do you like the following:

  • agent: Custom user agent comment (default is no comment). Example: --agent bob-wallet:2.0.0 will make it /hsd:5.0.1/bob-wallet:2.0.0/ while by default it's /hsd:5.0.1/. Must be not more than 255 characters long.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tiny nit: should we clarify that the max length applies to the whole agent and not just the custom part?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed.

Do you like the following:

  • agent: Custom user agent comment (default is no comment). Example: --agent bob-wallet:2.0.0 will make it /hsd:5.0.1/bob-wallet:2.0.0/ while by default it's /hsd:5.0.1/. The whole user agent string must be not more than 255 characters long.

@nodech nodech merged commit 7145cd0 into handshake-org:master Jan 9, 2025
1 check passed
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 this pull request may close these issues.

3 participants