deprecate MarketListRetrievalDeals, make gen
This commit is contained in:
@@ -140,7 +140,7 @@ func (t *HelloMessage) UnmarshalCBOR(r io.Reader) (err error) {
|
||||
case cbg.MajNegativeInt:
|
||||
extraI = int64(extra)
|
||||
if extraI < 0 {
|
||||
return fmt.Errorf("int64 negative oveflow")
|
||||
return fmt.Errorf("int64 negative overflow")
|
||||
}
|
||||
extraI = -1 - extraI
|
||||
default:
|
||||
@@ -250,7 +250,7 @@ func (t *LatencyMessage) UnmarshalCBOR(r io.Reader) (err error) {
|
||||
case cbg.MajNegativeInt:
|
||||
extraI = int64(extra)
|
||||
if extraI < 0 {
|
||||
return fmt.Errorf("int64 negative oveflow")
|
||||
return fmt.Errorf("int64 negative overflow")
|
||||
}
|
||||
extraI = -1 - extraI
|
||||
default:
|
||||
@@ -275,7 +275,7 @@ func (t *LatencyMessage) UnmarshalCBOR(r io.Reader) (err error) {
|
||||
case cbg.MajNegativeInt:
|
||||
extraI = int64(extra)
|
||||
if extraI < 0 {
|
||||
return fmt.Errorf("int64 negative oveflow")
|
||||
return fmt.Errorf("int64 negative overflow")
|
||||
}
|
||||
extraI = -1 - extraI
|
||||
default:
|
||||
|
||||
+2
-14
@@ -539,20 +539,8 @@ func (sm *StorageMinerAPI) MarketListDeals(ctx context.Context) ([]*api.MarketDe
|
||||
return sm.listDeals(ctx)
|
||||
}
|
||||
|
||||
func (sm *StorageMinerAPI) MarketListRetrievalDeals(ctx context.Context) ([]retrievalmarket.ProviderDealState, error) {
|
||||
var out []retrievalmarket.ProviderDealState
|
||||
deals := sm.RetrievalProvider.ListDeals()
|
||||
|
||||
for _, deal := range deals {
|
||||
if deal.ChannelID != nil {
|
||||
if deal.ChannelID.Initiator == "" || deal.ChannelID.Responder == "" {
|
||||
deal.ChannelID = nil // don't try to push unparsable peer IDs over jsonrpc
|
||||
}
|
||||
}
|
||||
out = append(out, deal)
|
||||
}
|
||||
|
||||
return out, nil
|
||||
func (sm *StorageMinerAPI) MarketListRetrievalDeals(ctx context.Context) ([]struct{}, error) {
|
||||
return []struct{}{}, nil
|
||||
}
|
||||
|
||||
func (sm *StorageMinerAPI) MarketGetDealUpdates(ctx context.Context) (<-chan storagemarket.MinerDeal, error) {
|
||||
|
||||
Reference in New Issue
Block a user