diff --git a/chain/exchange/client.go b/chain/exchange/client.go index b1e97292f..2c5b39b94 100644 --- a/chain/exchange/client.go +++ b/chain/exchange/client.go @@ -397,14 +397,14 @@ func (c *client) sendRequestToPeer(ctx context.Context, peer peer.ID, req *Reque }() // -- TRACE -- - supported, err := c.host.Peerstore().SupportsProtocols(peer, BlockSyncProtocolID, ChainExchangeProtocolID) + supported, err := c.host.Peerstore().SupportsProtocols(peer, ChainExchangeProtocolID) if err != nil { c.RemovePeer(peer) return nil, xerrors.Errorf("failed to get protocols for peer: %w", err) } - if len(supported) == 0 || (supported[0] != BlockSyncProtocolID && supported[0] != ChainExchangeProtocolID) { + if len(supported) == 0 || (supported[0] != ChainExchangeProtocolID) { return nil, xerrors.Errorf("peer %s does not support protocols %s", - peer, []string{BlockSyncProtocolID, ChainExchangeProtocolID}) + peer, []string{ChainExchangeProtocolID}) } connectionStart := build.Clock.Now() @@ -413,7 +413,7 @@ func (c *client) sendRequestToPeer(ctx context.Context, peer peer.ID, req *Reque stream, err := c.host.NewStream( network.WithNoDial(ctx, "should already have connection"), peer, - ChainExchangeProtocolID, BlockSyncProtocolID) + ChainExchangeProtocolID) if err != nil { c.RemovePeer(peer) return nil, xerrors.Errorf("failed to open stream to peer: %w", err) diff --git a/chain/exchange/protocol.go b/chain/exchange/protocol.go index d0977e54c..2df9dc959 100644 --- a/chain/exchange/protocol.go +++ b/chain/exchange/protocol.go @@ -16,10 +16,6 @@ import ( var log = logging.Logger("chainxchg") const ( - // BlockSyncProtocolID is the protocol ID of the former blocksync protocol. - // Deprecated. - BlockSyncProtocolID = "/fil/sync/blk/0.0.1" - // ChainExchangeProtocolID is the protocol ID of the chain exchange // protocol. ChainExchangeProtocolID = "/fil/chain/xchg/0.0.1" diff --git a/node/modules/services.go b/node/modules/services.go index 6c9a23d49..fba6dc2fd 100644 --- a/node/modules/services.go +++ b/node/modules/services.go @@ -98,7 +98,6 @@ func RunPeerMgr(mctx helpers.MetricsCtx, lc fx.Lifecycle, pmgr *peermgr.PeerMgr) } func RunChainExchange(h host.Host, svc exchange.Server) { - h.SetStreamHandler(exchange.BlockSyncProtocolID, svc.HandleStream) // old h.SetStreamHandler(exchange.ChainExchangeProtocolID, svc.HandleStream) // new }