-
Notifications
You must be signed in to change notification settings - Fork 20
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
Conversation
please fix lint issues |
client/api_client.go
Outdated
|
||
// AdminAPIInfo - the admin api info | ||
type AdminAPIInfo struct { | ||
isAdminApi bool // indicate if it is an admin api request |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix isAdminApi
as isAdminAPI
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
fdf8f1c
to
9cac6c5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
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: