storedask

package
v0.0.0-...-75360cb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 11, 2023 License: Apache-2.0, MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultDuration abi.ChainEpoch = 1000000

DefaultDuration is the default number of epochs a storage ask is in effect for

View Source
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

View Source
const DefaultMinPieceSize abi.PaddedPieceSize = 256

DefaultMinPieceSize is the minimum accepted piece size for data

Variables

View Source
var DefaultPrice = abi.NewTokenAmount(500000000)

DefaultPrice is the default price for unverified deals (in attoFil / GiB / Epoch)

View Source
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,
	opts ...storagemarket.StorageAskOption) (*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

GetAsk returns the current signed storage ask, or nil if one does not exist.

func (*StoredAsk) SetAsk

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. If no options are passed to configure MinPieceSize and MaxPieceSize, the previous ask's values will be used, if available. It also increments the sequence number on the ask

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL