Documentation
¶
Index ¶
Constants ¶
const DefaultDuration abi.ChainEpoch = 1000000
DefaultDuration is the default number of epochs a storage ask is in effect for
const DefaultMaxPieceSize abi.PaddedPieceSize = 1 << 20
DefaultMaxPieceSize is the default maximum accepted size for pieces for deals TODO: It would be nice to default this to the miner's sector size
const DefaultMinPieceSize abi.PaddedPieceSize = 256
DefaultMinPieceSize is the minimum accepted piece size for data
Variables ¶
var DefaultPrice = abi.NewTokenAmount(500000000)
DefaultPrice is the default price for unverified deals (in attoFil / GiB / Epoch)
var DefaultVerifiedPrice = abi.NewTokenAmount(50000000)
DefaultVerifiedPrice is the default price for verified deals (in attoFil / GiB / Epoch)
Functions ¶
This section is empty.
Types ¶
type StoredAsk ¶
type StoredAsk struct {
// contains filtered or unexported fields
}
StoredAsk implements a persisted SignedStorageAsk that lasts through restarts It also maintains a cache of the current SignedStorageAsk in memory
func NewStoredAsk ¶
func NewStoredAsk(ds datastore.Batching, dsKey datastore.Key, spn storagemarket.StorageProviderNode, actor address.Address) (*StoredAsk, error)
NewStoredAsk returns a new instance of StoredAsk It will initialize a new SignedStorageAsk on disk if one is not set Otherwise it loads the current SignedStorageAsk from disk
func (*StoredAsk) GetAsk ¶
func (s *StoredAsk) GetAsk() *storagemarket.SignedStorageAsk
GetAsk returns the current signed storage ask, or nil if one does not exist.
func (*StoredAsk) SetAsk ¶ added in v0.3.0
func (s *StoredAsk) SetAsk(price abi.TokenAmount, verifiedPrice abi.TokenAmount, duration abi.ChainEpoch, options ...storagemarket.StorageAskOption) error
SetAsk configures the storage miner's ask with the provided prices (for unverified and verified deals), duration, and options. Any previously-existing ask is replaced. It also increments the sequence number on the ask