@@ -13,19 +13,19 @@ import (
1313 "google.golang.org/grpc/status"
1414)
1515
16- // Deals provides an API for managing deals and storing data
16+ // Deals provides an API for managing deals and storing data.
1717type Deals struct {
1818 client rpc.RPCServiceClient
1919}
2020
21- // WatchEvent is used to send data or error values for Watch
21+ // WatchEvent is used to send data or error values for Watch.
2222type WatchEvent struct {
2323 Deal deals.DealInfo
2424 Err error
2525}
2626
2727// Store creates a proposal deal for data using wallet addr to all miners indicated
28- // by dealConfigs for duration epochs
28+ // by dealConfigs for duration epochs.
2929func (d * Deals ) Store (ctx context.Context , addr string , data io.Reader , dealConfigs []deals.StorageDealConfig , minDuration uint64 ) ([]cid.Cid , []deals.StorageDealConfig , error ) {
3030 stream , err := d .client .Store (ctx )
3131 if err != nil {
@@ -93,7 +93,7 @@ func (d *Deals) Store(ctx context.Context, addr string, data io.Reader, dealConf
9393 return cids , failedDeals , nil
9494}
9595
96- // Watch returnas a channel with state changes of indicated proposals
96+ // Watch returns a channel with state changes of indicated proposals.
9797func (d * Deals ) Watch (ctx context.Context , proposals []cid.Cid ) (<- chan WatchEvent , error ) {
9898 channel := make (chan WatchEvent )
9999 proposalStrings := make ([]string , len (proposals ))
@@ -145,7 +145,7 @@ func (d *Deals) Watch(ctx context.Context, proposals []cid.Cid) (<-chan WatchEve
145145 return channel , nil
146146}
147147
148- // Retrieve is used to fetch data from filecoin
148+ // Retrieve is used to fetch data from filecoin.
149149func (d * Deals ) Retrieve (ctx context.Context , waddr string , cid cid.Cid ) (io.Reader , error ) {
150150 req := & rpc.RetrieveRequest {
151151 Address : waddr ,
0 commit comments