Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoChannelID = fmt.Errorf("no data transfer channel id in deal")
Functions ¶
This section is empty.
Types ¶
type ContentDeal ¶
type ContentDeal struct { gorm.Model Content uint `json:"content" gorm:"index:,option:CONCURRENTLY"` UserID uint `json:"user_id" gorm:"index:,option:CONCURRENTLY"` PropCid util.DbCID `json:"propCid"` DealUUID string `json:"dealUuid"` Miner string `json:"miner"` DealID int64 `json:"dealId"` Failed bool `json:"failed"` Verified bool `json:"verified"` Slashed bool `json:"slashed"` FailedAt time.Time `json:"failedAt,omitempty"` DTChan string `json:"dtChan" gorm:"index"` TransferStarted time.Time `json:"transferStarted"` TransferFinished time.Time `json:"transferFinished"` OnChainAt time.Time `json:"onChainAt"` SealedAt time.Time `json:"sealedAt"` DealProtocolVersion protocol.ID `json:"deal_protocol_version"` MinerVersion string `json:"miner_version"` }
func (ContentDeal) ChannelID ¶
func (cd ContentDeal) ChannelID() (datatransfer.ChannelID, error)
func (ContentDeal) MinerAddr ¶
func (cd ContentDeal) MinerAddr() (address.Address, error)
type DfeRecord ¶
type DfeRecord struct { gorm.Model Miner string `json:"miner"` DealUUID string `json:"deal_uuid"` Phase string `json:"phase"` Message string `json:"message"` Content uint `json:"content" gorm:"index"` MinerVersion string `json:"minerVersion"` UserID uint `json:"user_id" gorm:"index"` DealProtocolVersion protocol.ID `json:"deal_protocol_version"` }
type MinerStorageAsk ¶
type MinerStorageAsk struct { gorm.Model `json:"-"` Miner string `gorm:"unique" json:"miner"` Price string `json:"price"` VerifiedPrice string `json:"verifiedPrice"` PriceBigInt big.Int `gorm:"-" json:"-"` VerifiedPriceBigInt big.Int `gorm:"-" json:"-"` MinPieceSize abi.PaddedPieceSize `json:"minPieceSize"` MaxPieceSize abi.PaddedPieceSize `json:"maxPieceSize"` MinerVersion string `json:"miner_version"` }
func (*MinerStorageAsk) GetPrice ¶
func (msa *MinerStorageAsk) GetPrice(isVerifiedDeal bool) types.BigInt
func (*MinerStorageAsk) PriceIsTooHigh ¶
func (msa *MinerStorageAsk) PriceIsTooHigh(cfg *config.Estuary) bool
func (*MinerStorageAsk) SizeIsCloseEnough ¶
func (msa *MinerStorageAsk) SizeIsCloseEnough(pieceSize abi.PaddedPieceSize) bool
type PieceCommRecord ¶
type ProposalRecord ¶
type RetrievalSuccessRecord ¶
type RetrievalSuccessRecord struct { ID uint `gorm:"primarykey" json:"-"` CreatedAt time.Time `json:"createdAt"` Cid util.DbCID `json:"cid"` Miner string `json:"miner"` Peer string `json:"peer"` Size uint64 `json:"size"` DurationMs int64 `json:"durationMs"` AverageSpeed uint64 `json:"averageSpeed"` TotalPayment string `json:"totalPayment"` NumPayments int `json:"numPayments"` AskPrice string `json:"askPrice"` }
type SanityCheck ¶
Click to show internal directories.
Click to hide internal directories.