diff --git a/core/network/impl/peer_manager_impl.cpp b/core/network/impl/peer_manager_impl.cpp index 60d8f0c66c..6fcd1decd1 100644 --- a/core/network/impl/peer_manager_impl.cpp +++ b/core/network/impl/peer_manager_impl.cpp @@ -744,17 +744,6 @@ namespace kagome::network { validation_protocol->protocolName(), peer_id, stream_result.error().message()); - auto ps = self->getPeerState(peer_info.id); - if (ps) { - self->tryOpenValidationProtocol( - peer_info, ps->get(), network::CollationVersion::V1); - } else { - SL_TRACE( - self->log_, - "No peer state to open V1 validation protocol {} with {}", - validation_protocol->protocolName(), - peer_id); - } return; } @@ -839,11 +828,13 @@ namespace kagome::network { } void PeerManagerImpl::reserveStatusStreams(const PeerId &peer_id) const { - auto proto_val_vstaging = router_->getValidationProtocolVStaging(); - BOOST_ASSERT_MSG(proto_val_vstaging, - "Router did not provide validation protocol vstaging"); + if (auto ps = getPeerState(peer_id); ps && ps->get().roles.authority) { + auto proto_val_vstaging = router_->getValidationProtocolVStaging(); + BOOST_ASSERT_MSG(proto_val_vstaging, + "Router did not provide validation protocol vstaging"); - stream_engine_->reserveStreams(peer_id, proto_val_vstaging); + stream_engine_->reserveStreams(peer_id, proto_val_vstaging); + } } void PeerManagerImpl::reserveStreams(const PeerId &peer_id) const { diff --git a/core/parachain/validator/impl/parachain_processor.cpp b/core/parachain/validator/impl/parachain_processor.cpp index 500c4981c2..6c19c98c9c 100644 --- a/core/parachain/validator/impl/parachain_processor.cpp +++ b/core/parachain/validator/impl/parachain_processor.cpp @@ -527,7 +527,7 @@ namespace kagome::parachain { void ParachainProcessorImpl::broadcastViewExcept( const libp2p::peer::PeerId &peer_id, const network::View &view) const { auto msg = std::make_shared< - network::WireMessage>( + network::WireMessage>( network::ViewUpdate{.view = view}); pm_->getStreamEngine()->broadcast( router_->getValidationProtocolVStaging(), @@ -568,7 +568,7 @@ namespace kagome::parachain { BOOST_ASSERT(se); auto message = std::make_shared< - network::WireMessage>(msg); + network::WireMessage>(msg); SL_TRACE( logger_, "Broadcasting view update to group.(relay_parent={}, group_size={})", @@ -587,7 +587,7 @@ namespace kagome::parachain { void ParachainProcessorImpl::broadcastView(const network::View &view) const { auto msg = std::make_shared< - network::WireMessage>( + network::WireMessage>( network::ViewUpdate{.view = view}); pm_->getStreamEngine()->broadcast(router_->getCollationProtocolVStaging(), msg); @@ -2822,7 +2822,7 @@ namespace kagome::parachain { peer_id, protocol, std::make_shared< - network::WireMessage>( + network::WireMessage>( network::ViewUpdate{.view = my_view->get().view})); }