Skip to content

Commit

Permalink
fix docsgen and update ffi
Browse files Browse the repository at this point in the history
  • Loading branch information
nonsense committed Jan 9, 2024
1 parent 30ec069 commit 997ddcf
Show file tree
Hide file tree
Showing 6 changed files with 2,074 additions and 11 deletions.
40 changes: 39 additions & 1 deletion api/api_full.go
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,45 @@ type MarketBalance struct {

type MarketDeal struct {
Proposal market.DealProposal
State market.DealState
State MarketDealState
}

type MarketDealState struct {
SectorStartEpoch abi.ChainEpoch // -1 if not yet included in proven sector
LastUpdatedEpoch abi.ChainEpoch // -1 if deal state never updated
SlashEpoch abi.ChainEpoch // -1 if deal never slashed
}

func MakeDealState(mds market.DealState) MarketDealState {
return MarketDealState{
SectorStartEpoch: mds.SectorStartEpoch(),
LastUpdatedEpoch: mds.LastUpdatedEpoch(),
SlashEpoch: mds.SlashEpoch(),
}
}

type mstate struct {
s MarketDealState
}

func (m mstate) SectorStartEpoch() abi.ChainEpoch {
return m.s.SectorStartEpoch
}

func (m mstate) LastUpdatedEpoch() abi.ChainEpoch {
return m.s.LastUpdatedEpoch
}

func (m mstate) SlashEpoch() abi.ChainEpoch {
return m.s.SlashEpoch
}

func (m mstate) Equals(o market.DealState) bool {
return market.DealStatesEqual(m, o)
}

func (m MarketDealState) Iface() market.DealState {
return mstate{m}
}

type RetrievalOrder struct {
Expand Down
Loading

0 comments on commit 997ddcf

Please sign in to comment.