diff --git a/mocks/service/lotusclient/LotusClient.go b/mocks/service/lotusclient/LotusClient.go index e271d57..a3e81c8 100644 --- a/mocks/service/lotusclient/LotusClient.go +++ b/mocks/service/lotusclient/LotusClient.go @@ -75,24 +75,3 @@ func (_m *LotusClient) ImportData(pcid cid.Cid, file string) error { return r0 } - -// IsRunningBoost provides a mock function with given fields: -func (_m *LotusClient) IsRunningBoost() (bool, error) { - ret := _m.Called() - - var r0 bool - if rf, ok := ret.Get(0).(func() bool); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(bool) - } - - var r1 error - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} diff --git a/service/lotusclient/lotusclient.go b/service/lotusclient/lotusclient.go index b1ed408..15e98de 100644 --- a/service/lotusclient/lotusclient.go +++ b/service/lotusclient/lotusclient.go @@ -36,7 +36,6 @@ type LotusClient interface { HealthCheck() error CurrentSealingSectors() (int, error) ImportData(pcid cid.Cid, file string) error - IsRunningBoost() (bool, error) } // Client provides access to Lotus for importing deal data. @@ -173,32 +172,6 @@ func (c *Client) ImportData(pcid cid.Cid, file string) error { return nil } -// IsRunningBoost detects if the storage provider is running Boost. -func (c *Client) IsRunningBoost() (bool, error) { - if c.fakeMode { - return false, nil - } - - ctx, cls := context.WithTimeout(context.Background(), time.Second*10) - defer cls() - peerID, err := c.cmkt.ID(ctx) - if err != nil { - return false, fmt.Errorf("getting lotus market peer-id: %s", err) - } - pinfo, err := c.cmkt.NetPeerInfo(ctx, peerID) - if err != nil { - return false, fmt.Errorf("getting lotus market peer %s info: %s", peerID, err) - } - - for _, p := range pinfo.Protocols { - if p == DealProtocolv120 { - return true, nil - } - } - - return false, nil -} - type clientBuilder func(ctx context.Context) (*api.StorageMinerStruct, func(), error) func newBuilder(maddrs string, authToken string, connRetries int) (clientBuilder, error) { diff --git a/service/service.go b/service/service.go index 23b7b48..ccaf971 100644 --- a/service/service.go +++ b/service/service.go @@ -192,12 +192,6 @@ func New( } fin.Add(commChannel) - isRunningBoost, err := lc.IsRunningBoost() - if err != nil { - return nil, fin.Cleanupf("detecting if storage-provider is running Boost: %s", err) - } - log.Infof("running-boost %v", isRunningBoost) - // Create bid store s, err := bidstore.NewStore( store, diff --git a/service/service_test.go b/service/service_test.go index 3b3e9c3..3c5fba7 100644 --- a/service/service_test.go +++ b/service/service_test.go @@ -309,7 +309,6 @@ func newLotusClientMock() *lotusclientmocks.LotusClient { mock.Anything, mock.Anything, ).Return(nil) - lc.On("IsRunningBoost").Return(false, nil) lc.On("Close").Return(nil) return lc }