Skip to content

Commit

Permalink
Merge pull request #5850 from filecoin-project/feat/markets-dealid
Browse files Browse the repository at this point in the history
expose NextID from nice market actor interface
  • Loading branch information
magik6k authored Mar 25, 2021
2 parents 01202c5 + 6bcf92f commit fc4f60e
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions chain/actors/builtin/market/market.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ type State interface {
VerifyDealsForActivation(
minerAddr address.Address, deals []abi.DealID, currEpoch, sectorExpiry abi.ChainEpoch,
) (weight, verifiedWeight abi.DealWeight, err error)
NextID() (abi.DealID, error)
}

type BalanceTable interface {
Expand Down
4 changes: 4 additions & 0 deletions chain/actors/builtin/market/v0.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ func (s *state0) VerifyDealsForActivation(
return market0.ValidateDealsForActivation(&s.State, s.store, deals, minerAddr, sectorExpiry, currEpoch)
}

func (s *state0) NextID() (abi.DealID, error) {
return s.State.NextID, nil
}

type balanceTable0 struct {
*adt0.BalanceTable
}
Expand Down
4 changes: 4 additions & 0 deletions chain/actors/builtin/market/v2.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,10 @@ func (s *state2) VerifyDealsForActivation(
return w, vw, err
}

func (s *state2) NextID() (abi.DealID, error) {
return s.State.NextID, nil
}

type balanceTable2 struct {
*adt2.BalanceTable
}
Expand Down
4 changes: 4 additions & 0 deletions chain/actors/builtin/market/v3.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,10 @@ func (s *state3) VerifyDealsForActivation(
return w, vw, err
}

func (s *state3) NextID() (abi.DealID, error) {
return s.State.NextID, nil
}

type balanceTable3 struct {
*adt3.BalanceTable
}
Expand Down

0 comments on commit fc4f60e

Please sign in to comment.