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

feat: support challenge admin v2 API #209

Merged
merged 4 commits into from
Oct 20, 2023
Merged

feat: support challenge admin v2 API #209

merged 4 commits into from
Oct 20, 2023

Conversation

flywukong
Copy link
Collaborator

@flywukong flywukong commented Oct 18, 2023

Description

support option to switch v2 version of challenge API of GetChallengeInfo to fix challenge API issue . The GetChallengeInfo will stay compatible with the old version.

The V2 challenge API will return the XML body with the intergrityHash , pieceHashes and piece data info

Rationale

the new challenge API will change protocol

Example

// if need use V2 version , set the option of UseV2version as true
// default using V1 version API to keep compatible
GetChallengeInfo( types.GetChallengeInfoOptions{UseV2version : true} )

Changes

Notable changes:

  • support v2 version of challenge API

@flywukong flywukong changed the title fix: support challenge admin v2 api fear: support challenge admin v2 api Oct 18, 2023
@forcodedancing
Copy link
Collaborator

please fix lint issues

@flywukong flywukong changed the title fear: support challenge admin v2 api feat: support challenge admin v2 api Oct 19, 2023
@flywukong flywukong changed the title feat: support challenge admin v2 api feat: support challenge admin v2 API Oct 19, 2023

// AdminAPIInfo - the admin api info
type AdminAPIInfo struct {
isAdminApi bool // indicate if it is an admin api request
Copy link
Contributor

Choose a reason for hiding this comment

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

fix isAdminApi as isAdminAPI

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed

Copy link
Contributor

@sysvm sysvm left a comment

Choose a reason for hiding this comment

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

LGTM

@flywukong flywukong added this pull request to the merge queue Oct 20, 2023
Merged via the queue into master with commit 4940fb6 Oct 20, 2023
4 checks 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.

4 participants