Skip to content

Commit

Permalink
Merge pull request #59 from filecoin-project/feat/separate-pc-deposit…
Browse files Browse the repository at this point in the history
…-func

Separate precommit deposit estimation func
  • Loading branch information
arajasek committed Jul 28, 2020
2 parents 2cfe2fe + 33f96f0 commit 32ef4ec
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions sealing.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ type SealingAPI interface {
StateMinerSectorSize(context.Context, address.Address, TipSetToken) (abi.SectorSize, error)
StateMinerWorkerAddress(ctx context.Context, maddr address.Address, tok TipSetToken) (address.Address, error)
StateMinerDeadlines(ctx context.Context, maddr address.Address, tok TipSetToken) ([]*miner.Deadline, error)
StateMinerPreCommitDepositForPower(context.Context, address.Address, miner.SectorPreCommitInfo, TipSetToken) (big.Int, error)
StateMinerInitialPledgeCollateral(context.Context, address.Address, miner.SectorPreCommitInfo, TipSetToken) (big.Int, error)
StateMarketStorageDeal(context.Context, abi.DealID, TipSetToken) (market.DealProposal, error)
SendMsg(ctx context.Context, from, to address.Address, method abi.MethodNum, value, gasPrice big.Int, gasLimit int64, params []byte) (cid.Cid, error)
Expand Down
2 changes: 1 addition & 1 deletion states_sealing.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ func (m *Sealing) handlePreCommitting(ctx statemachine.Context, sector SectorInf
return ctx.Send(SectorChainPreCommitFailed{xerrors.Errorf("could not serialize pre-commit sector parameters: %w", err)})
}

collateral, err := m.api.StateMinerInitialPledgeCollateral(ctx.Context(), m.maddr, *params, tok)
collateral, err := m.api.StateMinerPreCommitDepositForPower(ctx.Context(), m.maddr, *params, tok)
if err != nil {
return xerrors.Errorf("getting initial pledge collateral: %w", err)
}
Expand Down

0 comments on commit 32ef4ec

Please sign in to comment.