From bab92e1ab1b08fece3ce36e4b2cd8b80a4f02de9 Mon Sep 17 00:00:00 2001 From: 0x5459 <0x5459@protonmail.com> Date: Fri, 11 Aug 2023 10:10:21 +0800 Subject: [PATCH] feat(market): filter deals by sector lifetime --- venus-shared/api/market/v0/method.md | 8 ++++++-- venus-shared/api/market/v1/method.md | 8 ++++++-- venus-shared/types/market/assigner_type.go | 4 ++++ 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/venus-shared/api/market/v0/method.md b/venus-shared/api/market/v0/method.md index e2eac5a1f5..273ea80491 100644 --- a/venus-shared/api/market/v0/method.md +++ b/venus-shared/api/market/v0/method.md @@ -239,7 +239,9 @@ Inputs: "MinPieceSize": 42, "MinUsedSpace": 42, "StartEpoch": 10101, - "EndEpoch": 10101 + "EndEpoch": 10101, + "SectorActivation": 10101, + "SectorExpiration": 10101 } ] ``` @@ -1019,7 +1021,9 @@ Inputs: "MinPieceSize": 42, "MinUsedSpace": 42, "StartEpoch": 10101, - "EndEpoch": 10101 + "EndEpoch": 10101, + "SectorActivation": 10101, + "SectorExpiration": 10101 } ] ``` diff --git a/venus-shared/api/market/v1/method.md b/venus-shared/api/market/v1/method.md index ebf51b1833..413b3c21cd 100644 --- a/venus-shared/api/market/v1/method.md +++ b/venus-shared/api/market/v1/method.md @@ -240,7 +240,9 @@ Inputs: "MinPieceSize": 42, "MinUsedSpace": 42, "StartEpoch": 10101, - "EndEpoch": 10101 + "EndEpoch": 10101, + "SectorActivation": 10101, + "SectorExpiration": 10101 } ] ``` @@ -1020,7 +1022,9 @@ Inputs: "MinPieceSize": 42, "MinUsedSpace": 42, "StartEpoch": 10101, - "EndEpoch": 10101 + "EndEpoch": 10101, + "SectorActivation": 10101, + "SectorExpiration": 10101 } ] ``` diff --git a/venus-shared/types/market/assigner_type.go b/venus-shared/types/market/assigner_type.go index b5f122e8b1..445136982a 100644 --- a/venus-shared/types/market/assigner_type.go +++ b/venus-shared/types/market/assigner_type.go @@ -51,6 +51,10 @@ type GetDealSpec struct { // end epoch limit of the chosen deals // if set, the deals should not be alive after or equal than the this epoch EndEpoch abi.ChainEpoch + + // Filter by sector lifetime + SectorActivation *abi.ChainEpoch + SectorExpiration *abi.ChainEpoch } type DealInfoIncludePath struct {