Refactor protocols names
This commit is contained in:
parent
33aea058c4
commit
4518e23177
|
@ -1,3 +1,4 @@
|
|||
use libp2p::StreamProtocol;
|
||||
|
||||
pub const PROTOCOL_NAME: StreamProtocol = StreamProtocol::new("/nomos/da/0.1.0");
|
||||
pub const REPLICATION_PROTOCOL: StreamProtocol = StreamProtocol::new("/nomos/da/0.1.0/replication");
|
||||
pub const DISPERSAL_PROTOCOL: StreamProtocol = StreamProtocol::new("/nomos/da/0.1.0/dispersal");
|
||||
|
|
|
@ -16,7 +16,7 @@ use tracing::error;
|
|||
// internal
|
||||
use nomos_da_messages::{pack_message, unpack_from_reader};
|
||||
|
||||
use crate::protocol::PROTOCOL_NAME;
|
||||
use crate::protocol::REPLICATION_PROTOCOL;
|
||||
|
||||
pub type DaMessage = nomos_da_messages::replication::ReplicationReq;
|
||||
|
||||
|
@ -185,7 +185,7 @@ impl ConnectionHandler for ReplicationHandler {
|
|||
type OutboundOpenInfo = ();
|
||||
|
||||
fn listen_protocol(&self) -> SubstreamProtocol<Self::InboundProtocol, Self::InboundOpenInfo> {
|
||||
SubstreamProtocol::new(ReadyUpgrade::new(PROTOCOL_NAME), ())
|
||||
SubstreamProtocol::new(ReadyUpgrade::new(REPLICATION_PROTOCOL), ())
|
||||
}
|
||||
|
||||
fn poll(
|
||||
|
|
Loading…
Reference in New Issue