implement ask query protocol
This commit is contained in:
@@ -251,3 +251,7 @@ func (a *ClientAPI) ClientRetrieve(ctx context.Context, order api.RetrievalOrder
|
||||
|
||||
return outFile.Close()
|
||||
}
|
||||
|
||||
func (a *ClientAPI) ClientQueryAsk(ctx context.Context, p peer.ID, miner address.Address) (*types.SignedStorageAsk, error) {
|
||||
return a.DealClient.QueryAsk(ctx, p, miner)
|
||||
}
|
||||
|
||||
@@ -104,6 +104,7 @@ func HandleDeals(mctx helpers.MetricsCtx, lc fx.Lifecycle, host host.Host, h *de
|
||||
OnStart: func(context.Context) error {
|
||||
h.Run(ctx)
|
||||
host.SetStreamHandler(deals.ProtocolID, h.HandleStream)
|
||||
host.SetStreamHandler(deals.AskProtocolID, h.HandleAskStream)
|
||||
return nil
|
||||
},
|
||||
OnStop: func(context.Context) error {
|
||||
|
||||
Reference in New Issue
Block a user