diff --git a/dfget/types/register_response.go b/dfget/types/register_response.go index 1175868ab..6aa9f9816 100644 --- a/dfget/types/register_response.go +++ b/dfget/types/register_response.go @@ -41,4 +41,10 @@ type RegisterResponseData struct { FileLength int64 `json:"fileLength"` PieceSize int32 `json:"pieceSize"` CDNSource apiTypes.CdnSource `json:"cdnSource"` + + // in seed pattern, if peer selected as seed, AsSeed sets true. + AsSeed bool `json:"asSeed"` + + // in seed pattern, if as seed, SeedTaskID is the taskID of seed file. + SeedTaskID string `json:"seedTaskID"` } diff --git a/dfget/types/report_piece_request.go b/dfget/types/report_piece_request.go index 4698992e3..8cfbe6501 100644 --- a/dfget/types/report_piece_request.go +++ b/dfget/types/report_piece_request.go @@ -23,8 +23,4 @@ type ReportPieceRequest struct { Cid string `request:"cid"` DstCid string `request:"dstCid"` PieceRange string `request:"pieceRange"` - // seed resp - AsSeed bool `json:"asSeed"` - // if as seed, SeedTaskID is the taskID of seed file. - SeedTaskID string `json:"seedTaskID"` } diff --git a/supernode/server/0.3_bridge.go b/supernode/server/0.3_bridge.go index 197511917..a2aff34d4 100644 --- a/supernode/server/0.3_bridge.go +++ b/supernode/server/0.3_bridge.go @@ -40,6 +40,12 @@ type RegisterResponseData struct { FileLength int64 `json:"fileLength"` PieceSize int32 `json:"pieceSize"` CDNSource string `json:"cdnSource"` + + // in seed pattern, if peer selected as seed, AsSeed sets true. + AsSeed bool `json:"asSeed"` + + // in seed pattern, if as seed, SeedTaskID is the taskID of seed file. + SeedTaskID string `json:"seedTaskID"` } // PullPieceTaskResponseContinueData is the data when successfully pulling piece task