This commit is contained in:
Łukasz Magiera 2020-02-08 03:18:37 +01:00
parent 13435aebdc
commit 41daf5ad28
11 changed files with 35 additions and 41 deletions

View File

@ -283,7 +283,7 @@ func (sma StorageMinerActor) ProveCommitSector(act *types.Actor, vmctx types.VMC
return nil, aerrors.New(1, "no pre-commitment found for sector")
}
if us.ReceivedEpoch+build.InteractivePoRepDelay >= uint64(vmctx.BlockHeight()){
if us.ReceivedEpoch+build.InteractivePoRepDelay >= uint64(vmctx.BlockHeight()) {
return nil, aerrors.New(2, "too early for proof submission")
}
@ -973,7 +973,7 @@ func onSuccessfulPoSt2(self *StorageMinerActorState, vmctx types.VMContext, acti
if !(oldPower.IsZero() && newPower.IsZero()) {
enc, err := SerializeParams(&UpdateStorageParams{
Delta: delta,
NextSlashDeadline: uint64(vmctx.BlockHeight())+ build.SlashablePowerDelay,
NextSlashDeadline: uint64(vmctx.BlockHeight()) + build.SlashablePowerDelay,
PreviousSlashDeadline: prevSlashingDeadline,
})
if err != nil {

View File

@ -4,7 +4,6 @@ import (
"github.com/filecoin-project/specs-actors/actors/builtin/market"
)
type smaMethods struct {
Constructor uint64
WithdrawBalance uint64
@ -44,7 +43,6 @@ type ActivateStorageDealsParams = market.VerifyDealsOnSectorProveCommitParams
type ComputeDataCommitmentParams = market.ComputeDataCommitmentParams
/*
func (sma StorageMarketActor) HandleCronAction(act *types.Actor, vmctx types.VMContext, params *struct{}) ([]byte, ActorError) {

View File

@ -501,7 +501,6 @@ func (t *StorageMinerConstructorParams) MarshalCBOR(w io.Writer) error {
return nil
}
func (t *SectorPreCommitInfo) MarshalCBOR(w io.Writer) error {
if t == nil {
_, err := w.Write(cbg.CborNull)
@ -1763,7 +1762,6 @@ func (t *CreateStorageMinerParams) MarshalCBOR(w io.Writer) error {
return nil
}
func (t *PowerLookupParams) MarshalCBOR(w io.Writer) error {
if t == nil {
_, err := w.Write(cbg.CborNull)
@ -2056,7 +2054,6 @@ func (t *MinerSlashConsensusFault) UnmarshalCBOR(r io.Reader) error {
}
// t.AtHeight (uint64) (uint64)
// t.SlashedCollateral (types.BigInt) (struct)
{

View File

@ -348,7 +348,7 @@ func (cg *ChainGen) makeBlock(parents *types.TipSet, m address.Address, eproof *
if cg.Timestamper != nil {
ts = cg.Timestamper(parents, height-parents.Height())
} else {
ts = parents.MinTimestamp() + uint64((height - parents.Height()) * build.BlockDelay)
ts = parents.MinTimestamp() + uint64((height-parents.Height())*build.BlockDelay)
}
fblk, err := MinerCreateBlock(context.TODO(), cg.sm, cg.w, m, parents, ticket, eproof, msgs, height, ts)

View File

@ -193,7 +193,6 @@ func (t *BlockHeader) UnmarshalCBOR(r io.Reader) error {
}
// t.Height (uint64) (uint64)
// t.ParentMessageReceipts (cid.Cid) (struct)
{

View File

@ -10,8 +10,8 @@ import (
vaddress "github.com/filecoin-project/chain-validation/pkg/state/address"
vtypes "github.com/filecoin-project/chain-validation/pkg/state/types"
"github.com/filecoin-project/specs-actors/actors/builtin"
"github.com/filecoin-project/go-address"
"github.com/filecoin-project/specs-actors/actors/builtin"
"github.com/filecoin-project/lotus/chain/actors"
"github.com/filecoin-project/lotus/chain/types"