gofmt
This commit is contained in:
parent
13435aebdc
commit
41daf5ad28
@ -50,7 +50,7 @@ type FullNodeStruct struct {
|
|||||||
ChainGetBlockMessages func(context.Context, cid.Cid) (*api.BlockMessages, error) `perm:"read"`
|
ChainGetBlockMessages func(context.Context, cid.Cid) (*api.BlockMessages, error) `perm:"read"`
|
||||||
ChainGetParentReceipts func(context.Context, cid.Cid) ([]*types.MessageReceipt, error) `perm:"read"`
|
ChainGetParentReceipts func(context.Context, cid.Cid) ([]*types.MessageReceipt, error) `perm:"read"`
|
||||||
ChainGetParentMessages func(context.Context, cid.Cid) ([]api.Message, error) `perm:"read"`
|
ChainGetParentMessages func(context.Context, cid.Cid) ([]api.Message, error) `perm:"read"`
|
||||||
ChainGetTipSetByHeight func(context.Context, abi.ChainEpoch, *types.TipSet) (*types.TipSet, error) `perm:"read"`
|
ChainGetTipSetByHeight func(context.Context, abi.ChainEpoch, *types.TipSet) (*types.TipSet, error) `perm:"read"`
|
||||||
ChainReadObj func(context.Context, cid.Cid) ([]byte, error) `perm:"read"`
|
ChainReadObj func(context.Context, cid.Cid) ([]byte, error) `perm:"read"`
|
||||||
ChainHasObj func(context.Context, cid.Cid) (bool, error) `perm:"read"`
|
ChainHasObj func(context.Context, cid.Cid) (bool, error) `perm:"read"`
|
||||||
ChainSetHead func(context.Context, *types.TipSet) error `perm:"admin"`
|
ChainSetHead func(context.Context, *types.TipSet) error `perm:"admin"`
|
||||||
@ -95,30 +95,30 @@ type FullNodeStruct struct {
|
|||||||
ClientRetrieve func(ctx context.Context, order api.RetrievalOrder, path string) error `perm:"admin"`
|
ClientRetrieve func(ctx context.Context, order api.RetrievalOrder, path string) error `perm:"admin"`
|
||||||
ClientQueryAsk func(ctx context.Context, p peer.ID, miner address.Address) (*types.SignedStorageAsk, error) `perm:"read"`
|
ClientQueryAsk func(ctx context.Context, p peer.ID, miner address.Address) (*types.SignedStorageAsk, error) `perm:"read"`
|
||||||
|
|
||||||
StateMinerSectors func(context.Context, address.Address, *types.TipSet) ([]*api.ChainSectorInfo, error) `perm:"read"`
|
StateMinerSectors func(context.Context, address.Address, *types.TipSet) ([]*api.ChainSectorInfo, error) `perm:"read"`
|
||||||
StateMinerProvingSet func(context.Context, address.Address, *types.TipSet) ([]*api.ChainSectorInfo, error) `perm:"read"`
|
StateMinerProvingSet func(context.Context, address.Address, *types.TipSet) ([]*api.ChainSectorInfo, error) `perm:"read"`
|
||||||
StateMinerPower func(context.Context, address.Address, *types.TipSet) (api.MinerPower, error) `perm:"read"`
|
StateMinerPower func(context.Context, address.Address, *types.TipSet) (api.MinerPower, error) `perm:"read"`
|
||||||
StateMinerWorker func(context.Context, address.Address, *types.TipSet) (address.Address, error) `perm:"read"`
|
StateMinerWorker func(context.Context, address.Address, *types.TipSet) (address.Address, error) `perm:"read"`
|
||||||
StateMinerPeerID func(ctx context.Context, m address.Address, ts *types.TipSet) (peer.ID, error) `perm:"read"`
|
StateMinerPeerID func(ctx context.Context, m address.Address, ts *types.TipSet) (peer.ID, error) `perm:"read"`
|
||||||
StateMinerElectionPeriodStart func(ctx context.Context, actor address.Address, ts *types.TipSet) (uint64, error) `perm:"read"`
|
StateMinerElectionPeriodStart func(ctx context.Context, actor address.Address, ts *types.TipSet) (uint64, error) `perm:"read"`
|
||||||
StateMinerSectorSize func(context.Context, address.Address, *types.TipSet) (abi.SectorSize, error) `perm:"read"`
|
StateMinerSectorSize func(context.Context, address.Address, *types.TipSet) (abi.SectorSize, error) `perm:"read"`
|
||||||
StateMinerFaults func(context.Context, address.Address, *types.TipSet) ([]uint64, error) `perm:"read"`
|
StateMinerFaults func(context.Context, address.Address, *types.TipSet) ([]uint64, error) `perm:"read"`
|
||||||
StateCall func(context.Context, *types.Message, *types.TipSet) (*api.MethodCall, error) `perm:"read"`
|
StateCall func(context.Context, *types.Message, *types.TipSet) (*api.MethodCall, error) `perm:"read"`
|
||||||
StateReplay func(context.Context, *types.TipSet, cid.Cid) (*api.ReplayResults, error) `perm:"read"`
|
StateReplay func(context.Context, *types.TipSet, cid.Cid) (*api.ReplayResults, error) `perm:"read"`
|
||||||
StateGetActor func(context.Context, address.Address, *types.TipSet) (*types.Actor, error) `perm:"read"`
|
StateGetActor func(context.Context, address.Address, *types.TipSet) (*types.Actor, error) `perm:"read"`
|
||||||
StateReadState func(context.Context, *types.Actor, *types.TipSet) (*api.ActorState, error) `perm:"read"`
|
StateReadState func(context.Context, *types.Actor, *types.TipSet) (*api.ActorState, error) `perm:"read"`
|
||||||
StatePledgeCollateral func(context.Context, *types.TipSet) (types.BigInt, error) `perm:"read"`
|
StatePledgeCollateral func(context.Context, *types.TipSet) (types.BigInt, error) `perm:"read"`
|
||||||
StateWaitMsg func(context.Context, cid.Cid) (*api.MsgWait, error) `perm:"read"`
|
StateWaitMsg func(context.Context, cid.Cid) (*api.MsgWait, error) `perm:"read"`
|
||||||
StateListMiners func(context.Context, *types.TipSet) ([]address.Address, error) `perm:"read"`
|
StateListMiners func(context.Context, *types.TipSet) ([]address.Address, error) `perm:"read"`
|
||||||
StateListActors func(context.Context, *types.TipSet) ([]address.Address, error) `perm:"read"`
|
StateListActors func(context.Context, *types.TipSet) ([]address.Address, error) `perm:"read"`
|
||||||
StateMarketBalance func(context.Context, address.Address, *types.TipSet) (api.MarketBalance, error) `perm:"read"`
|
StateMarketBalance func(context.Context, address.Address, *types.TipSet) (api.MarketBalance, error) `perm:"read"`
|
||||||
StateMarketParticipants func(context.Context, *types.TipSet) (map[string]api.MarketBalance, error) `perm:"read"`
|
StateMarketParticipants func(context.Context, *types.TipSet) (map[string]api.MarketBalance, error) `perm:"read"`
|
||||||
StateMarketDeals func(context.Context, *types.TipSet) (map[string]market.DealProposal, error) `perm:"read"`
|
StateMarketDeals func(context.Context, *types.TipSet) (map[string]market.DealProposal, error) `perm:"read"`
|
||||||
StateMarketStorageDeal func(context.Context, abi.DealID, *types.TipSet) (*market.DealProposal, error) `perm:"read"`
|
StateMarketStorageDeal func(context.Context, abi.DealID, *types.TipSet) (*market.DealProposal, error) `perm:"read"`
|
||||||
StateLookupID func(ctx context.Context, addr address.Address, ts *types.TipSet) (address.Address, error) `perm:"read"`
|
StateLookupID func(ctx context.Context, addr address.Address, ts *types.TipSet) (address.Address, error) `perm:"read"`
|
||||||
StateChangedActors func(context.Context, cid.Cid, cid.Cid) (map[string]types.Actor, error) `perm:"read"`
|
StateChangedActors func(context.Context, cid.Cid, cid.Cid) (map[string]types.Actor, error) `perm:"read"`
|
||||||
StateGetReceipt func(context.Context, cid.Cid, *types.TipSet) (*types.MessageReceipt, error) `perm:"read"`
|
StateGetReceipt func(context.Context, cid.Cid, *types.TipSet) (*types.MessageReceipt, error) `perm:"read"`
|
||||||
StateMinerSectorCount func(context.Context, address.Address, *types.TipSet) (api.MinerSectors, error) `perm:"read"`
|
StateMinerSectorCount func(context.Context, address.Address, *types.TipSet) (api.MinerSectors, error) `perm:"read"`
|
||||||
StateListMessages func(ctx context.Context, match *types.Message, ts *types.TipSet, toht abi.ChainEpoch) ([]cid.Cid, error) `perm:"read"`
|
StateListMessages func(ctx context.Context, match *types.Message, ts *types.TipSet, toht abi.ChainEpoch) ([]cid.Cid, error) `perm:"read"`
|
||||||
StateCompute func(context.Context, abi.ChainEpoch, []*types.Message, *types.TipSet) (cid.Cid, error) `perm:"read"`
|
StateCompute func(context.Context, abi.ChainEpoch, []*types.Message, *types.TipSet) (cid.Cid, error) `perm:"read"`
|
||||||
|
|
||||||
|
@ -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")
|
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")
|
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()) {
|
if !(oldPower.IsZero() && newPower.IsZero()) {
|
||||||
enc, err := SerializeParams(&UpdateStorageParams{
|
enc, err := SerializeParams(&UpdateStorageParams{
|
||||||
Delta: delta,
|
Delta: delta,
|
||||||
NextSlashDeadline: uint64(vmctx.BlockHeight())+ build.SlashablePowerDelay,
|
NextSlashDeadline: uint64(vmctx.BlockHeight()) + build.SlashablePowerDelay,
|
||||||
PreviousSlashDeadline: prevSlashingDeadline,
|
PreviousSlashDeadline: prevSlashingDeadline,
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -4,7 +4,6 @@ import (
|
|||||||
"github.com/filecoin-project/specs-actors/actors/builtin/market"
|
"github.com/filecoin-project/specs-actors/actors/builtin/market"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
type smaMethods struct {
|
type smaMethods struct {
|
||||||
Constructor uint64
|
Constructor uint64
|
||||||
WithdrawBalance uint64
|
WithdrawBalance uint64
|
||||||
@ -44,7 +43,6 @@ type ActivateStorageDealsParams = market.VerifyDealsOnSectorProveCommitParams
|
|||||||
|
|
||||||
type ComputeDataCommitmentParams = market.ComputeDataCommitmentParams
|
type ComputeDataCommitmentParams = market.ComputeDataCommitmentParams
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
func (sma StorageMarketActor) HandleCronAction(act *types.Actor, vmctx types.VMContext, params *struct{}) ([]byte, ActorError) {
|
func (sma StorageMarketActor) HandleCronAction(act *types.Actor, vmctx types.VMContext, params *struct{}) ([]byte, ActorError) {
|
||||||
|
|
||||||
|
@ -501,7 +501,6 @@ func (t *StorageMinerConstructorParams) MarshalCBOR(w io.Writer) error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
func (t *SectorPreCommitInfo) MarshalCBOR(w io.Writer) error {
|
func (t *SectorPreCommitInfo) MarshalCBOR(w io.Writer) error {
|
||||||
if t == nil {
|
if t == nil {
|
||||||
_, err := w.Write(cbg.CborNull)
|
_, err := w.Write(cbg.CborNull)
|
||||||
@ -1763,7 +1762,6 @@ func (t *CreateStorageMinerParams) MarshalCBOR(w io.Writer) error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
func (t *PowerLookupParams) MarshalCBOR(w io.Writer) error {
|
func (t *PowerLookupParams) MarshalCBOR(w io.Writer) error {
|
||||||
if t == nil {
|
if t == nil {
|
||||||
_, err := w.Write(cbg.CborNull)
|
_, err := w.Write(cbg.CborNull)
|
||||||
@ -2056,7 +2054,6 @@ func (t *MinerSlashConsensusFault) UnmarshalCBOR(r io.Reader) error {
|
|||||||
}
|
}
|
||||||
// t.AtHeight (uint64) (uint64)
|
// t.AtHeight (uint64) (uint64)
|
||||||
|
|
||||||
|
|
||||||
// t.SlashedCollateral (types.BigInt) (struct)
|
// t.SlashedCollateral (types.BigInt) (struct)
|
||||||
|
|
||||||
{
|
{
|
||||||
|
@ -348,7 +348,7 @@ func (cg *ChainGen) makeBlock(parents *types.TipSet, m address.Address, eproof *
|
|||||||
if cg.Timestamper != nil {
|
if cg.Timestamper != nil {
|
||||||
ts = cg.Timestamper(parents, height-parents.Height())
|
ts = cg.Timestamper(parents, height-parents.Height())
|
||||||
} else {
|
} 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)
|
fblk, err := MinerCreateBlock(context.TODO(), cg.sm, cg.w, m, parents, ticket, eproof, msgs, height, ts)
|
||||||
|
@ -835,7 +835,7 @@ func (cs *ChainStore) Blockstore() bstore.Blockstore {
|
|||||||
|
|
||||||
func ActorStore(ctx context.Context, bs blockstore.Blockstore) adt.Store {
|
func ActorStore(ctx context.Context, bs blockstore.Blockstore) adt.Store {
|
||||||
return &astore{
|
return &astore{
|
||||||
cst: cbor.NewCborStore(bs),
|
cst: cbor.NewCborStore(bs),
|
||||||
ctx: ctx,
|
ctx: ctx,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -193,7 +193,6 @@ func (t *BlockHeader) UnmarshalCBOR(r io.Reader) error {
|
|||||||
}
|
}
|
||||||
// t.Height (uint64) (uint64)
|
// t.Height (uint64) (uint64)
|
||||||
|
|
||||||
|
|
||||||
// t.ParentMessageReceipts (cid.Cid) (struct)
|
// t.ParentMessageReceipts (cid.Cid) (struct)
|
||||||
|
|
||||||
{
|
{
|
||||||
|
@ -10,8 +10,8 @@ import (
|
|||||||
vaddress "github.com/filecoin-project/chain-validation/pkg/state/address"
|
vaddress "github.com/filecoin-project/chain-validation/pkg/state/address"
|
||||||
vtypes "github.com/filecoin-project/chain-validation/pkg/state/types"
|
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/go-address"
|
||||||
|
"github.com/filecoin-project/specs-actors/actors/builtin"
|
||||||
|
|
||||||
"github.com/filecoin-project/lotus/chain/actors"
|
"github.com/filecoin-project/lotus/chain/actors"
|
||||||
"github.com/filecoin-project/lotus/chain/types"
|
"github.com/filecoin-project/lotus/chain/types"
|
||||||
|
@ -160,8 +160,8 @@ func createDeals(m *genesis.GenesisMiner, k *wallet.Key, maddr address.Address,
|
|||||||
StartEpoch: 1, // TODO: allow setting
|
StartEpoch: 1, // TODO: allow setting
|
||||||
EndEpoch: 9001,
|
EndEpoch: 9001,
|
||||||
StoragePricePerEpoch: big.Zero(),
|
StoragePricePerEpoch: big.Zero(),
|
||||||
ProviderCollateral: big.Zero(),
|
ProviderCollateral: big.Zero(),
|
||||||
ClientCollateral: big.Zero(),
|
ClientCollateral: big.Zero(),
|
||||||
}
|
}
|
||||||
|
|
||||||
sector.Deal = *proposal
|
sector.Deal = *proposal
|
||||||
|
@ -52,14 +52,14 @@ func (m *Sealing) pledgeSector(ctx context.Context, sectorID abi.SectorNumber, e
|
|||||||
PieceSize: size.Padded(),
|
PieceSize: size.Padded(),
|
||||||
Client: m.worker,
|
Client: m.worker,
|
||||||
Provider: m.maddr,
|
Provider: m.maddr,
|
||||||
StartEpoch: math.MaxInt64,
|
StartEpoch: math.MaxInt64,
|
||||||
EndEpoch: math.MaxInt64,
|
EndEpoch: math.MaxInt64,
|
||||||
StoragePricePerEpoch: types.NewInt(0),
|
StoragePricePerEpoch: types.NewInt(0),
|
||||||
ProviderCollateral: types.NewInt(0),
|
ProviderCollateral: types.NewInt(0),
|
||||||
}
|
}
|
||||||
|
|
||||||
deals[i] = market.ClientDealProposal{
|
deals[i] = market.ClientDealProposal{
|
||||||
Proposal: sdp,
|
Proposal: sdp,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -71,7 +71,7 @@ func (m *Sealing) fastPledgeCommitment(size abi.UnpaddedPieceSize, parts uint64)
|
|||||||
err = multierror.Append(err, perr)
|
err = multierror.Append(err, perr)
|
||||||
}
|
}
|
||||||
out[i] = sectorbuilder.PublicPieceInfo{
|
out[i] = sectorbuilder.PublicPieceInfo{
|
||||||
Size: uint64(piece),
|
Size: uint64(piece),
|
||||||
CommP: commP,
|
CommP: commP,
|
||||||
}
|
}
|
||||||
lk.Unlock()
|
lk.Unlock()
|
||||||
|
Loading…
Reference in New Issue
Block a user