2020-01-10 18:21:46 +00:00
|
|
|
package utils
|
|
|
|
|
|
|
|
import (
|
2020-02-08 02:18:32 +00:00
|
|
|
"github.com/filecoin-project/specs-actors/actors/abi"
|
2020-01-10 18:21:46 +00:00
|
|
|
peer "github.com/libp2p/go-libp2p-peer"
|
|
|
|
|
|
|
|
"github.com/filecoin-project/go-address"
|
|
|
|
"github.com/filecoin-project/go-fil-markets/storagemarket"
|
|
|
|
)
|
|
|
|
|
2020-02-08 02:18:32 +00:00
|
|
|
func NewStorageProviderInfo(address address.Address, miner address.Address, sectorSize abi.SectorSize, peer peer.ID) storagemarket.StorageProviderInfo {
|
2020-01-10 18:21:46 +00:00
|
|
|
return storagemarket.StorageProviderInfo{
|
|
|
|
Address: address,
|
|
|
|
Worker: miner,
|
2020-02-08 02:18:32 +00:00
|
|
|
SectorSize: uint64(sectorSize),
|
2020-01-10 18:21:46 +00:00
|
|
|
PeerID: peer,
|
|
|
|
}
|
|
|
|
}
|