From d34b918af8ada430bcd1c4054abd7bb7f4af2900 Mon Sep 17 00:00:00 2001 From: 0x5459 <0x5459@protonmail.com> Date: Fri, 11 Aug 2023 10:20:31 +0800 Subject: [PATCH 1/2] feat(market): filter deals by sector lifetime --- venus-shared/api/market/v0/method.md | 6 ++++-- venus-shared/api/market/v1/method.md | 6 ++++-- venus-shared/types/market/assigner_type.go | 3 +++ 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/venus-shared/api/market/v0/method.md b/venus-shared/api/market/v0/method.md index e2eac5a1f5..35b68187b8 100644 --- a/venus-shared/api/market/v0/method.md +++ b/venus-shared/api/market/v0/method.md @@ -239,7 +239,8 @@ Inputs: "MinPieceSize": 42, "MinUsedSpace": 42, "StartEpoch": 10101, - "EndEpoch": 10101 + "EndEpoch": 10101, + "SectorExpiration": 10101 } ] ``` @@ -1019,7 +1020,8 @@ Inputs: "MinPieceSize": 42, "MinUsedSpace": 42, "StartEpoch": 10101, - "EndEpoch": 10101 + "EndEpoch": 10101, + "SectorExpiration": 10101 } ] ``` diff --git a/venus-shared/api/market/v1/method.md b/venus-shared/api/market/v1/method.md index ebf51b1833..9245e08808 100644 --- a/venus-shared/api/market/v1/method.md +++ b/venus-shared/api/market/v1/method.md @@ -240,7 +240,8 @@ Inputs: "MinPieceSize": 42, "MinUsedSpace": 42, "StartEpoch": 10101, - "EndEpoch": 10101 + "EndEpoch": 10101, + "SectorExpiration": 10101 } ] ``` @@ -1020,7 +1021,8 @@ Inputs: "MinPieceSize": 42, "MinUsedSpace": 42, "StartEpoch": 10101, - "EndEpoch": 10101 + "EndEpoch": 10101, + "SectorExpiration": 10101 } ] ``` diff --git a/venus-shared/types/market/assigner_type.go b/venus-shared/types/market/assigner_type.go index b5f122e8b1..d57628e4ba 100644 --- a/venus-shared/types/market/assigner_type.go +++ b/venus-shared/types/market/assigner_type.go @@ -51,6 +51,9 @@ 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 + SectorExpiration *abi.ChainEpoch } type DealInfoIncludePath struct { From e471284de623d75a46f2eed7e0b45307a368685e Mon Sep 17 00:00:00 2001 From: 0x5459 <0x5459@protonmail.com> Date: Fri, 11 Aug 2023 11:13:55 +0800 Subject: [PATCH 2/2] update comment --- venus-shared/types/market/assigner_type.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/venus-shared/types/market/assigner_type.go b/venus-shared/types/market/assigner_type.go index d57628e4ba..dfb3f259d0 100644 --- a/venus-shared/types/market/assigner_type.go +++ b/venus-shared/types/market/assigner_type.go @@ -52,7 +52,7 @@ type GetDealSpec struct { // if set, the deals should not be alive after or equal than the this epoch EndEpoch abi.ChainEpoch - // Filter by sector lifetime + // Filter by sector lifetime, for snapdeal SectorExpiration *abi.ChainEpoch }