From 16fb9daad3fa45c1f40dd71ccb055447eeaeec08 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 c101be2e3e..0ff18a4423 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 1a5f90bacb..c0a0c40c89 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 56b36c6855f60f91c0e266cc9825db9ead0d44ee 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 }