Skip to content

Commit

Permalink
[Networking] Rename StateSynchronizerDirectSend protocol to StateSync…
Browse files Browse the repository at this point in the history
…DirectSend
  • Loading branch information
JoshLind authored and bors-libra committed Jan 22, 2021
1 parent 88de0f0 commit 995d81e
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion network/src/peer/fuzzing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ pub fn fuzz(data: &[u8]) {
ProtocolId::ConsensusRpc,
ProtocolId::ConsensusDirectSend,
ProtocolId::MempoolDirectSend,
ProtocolId::StateSynchronizerDirectSend,
ProtocolId::StateSyncDirectSend,
ProtocolId::DiscoveryDirectSend,
ProtocolId::HealthCheckerRpc,
]
Expand Down
6 changes: 3 additions & 3 deletions network/src/protocols/wire/handshake/v1/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ pub enum ProtocolId {
ConsensusRpc = 0,
ConsensusDirectSend = 1,
MempoolDirectSend = 2,
StateSynchronizerDirectSend = 3,
StateSyncDirectSend = 3,
DiscoveryDirectSend = 4,
HealthCheckerRpc = 5,
}
Expand All @@ -48,7 +48,7 @@ impl ProtocolId {
ConsensusRpc => "ConsensusRpc",
ConsensusDirectSend => "ConsensusDirectSend",
MempoolDirectSend => "MempoolDirectSend",
StateSynchronizerDirectSend => "StateSynchronizerDirectSend",
StateSyncDirectSend => "StateSyncDirectSend",
DiscoveryDirectSend => "DiscoveryDirectSend",
HealthCheckerRpc => "HealthCheckerRpc",
}
Expand Down Expand Up @@ -175,7 +175,7 @@ impl HandshakeMsg {
let mut supported_protocols = BTreeMap::new();
supported_protocols.insert(
MessagingProtocolVersion::V1,
[ProtocolId::StateSynchronizerDirectSend].iter().into(),
[ProtocolId::StateSyncDirectSend].iter().into(),
);
Self {
chain_id: ChainId::test(),
Expand Down
2 changes: 1 addition & 1 deletion specifications/network/messaging-v1.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ enum ProtocolId {
ConsensusRpc = 0,
ConsensusDirectSend = 1,
MempoolDirectSend = 2,
StateSynchronizerDirectSend = 3,
StateSyncDirectSend = 3,
DiscoveryDirectSend = 4,
HealthCheckerRpc = 5,
IdentityDirectSend = 6,
Expand Down
4 changes: 2 additions & 2 deletions state-sync/src/network.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ impl StateSyncSender {
recipient: PeerId,
message: StateSynchronizerMsg,
) -> Result<(), NetworkError> {
let protocol = ProtocolId::StateSynchronizerDirectSend;
let protocol = ProtocolId::StateSyncDirectSend;
self.inner.send_to(recipient, protocol, message)
}
}
Expand All @@ -77,7 +77,7 @@ pub fn network_endpoint_config() -> (
) {
(
vec![],
vec![ProtocolId::StateSynchronizerDirectSend],
vec![ProtocolId::StateSyncDirectSend],
QueueStyle::LIFO,
STATE_SYNC_MAX_BUFFER_SIZE,
Some(&counters::PENDING_STATE_SYNC_NETWORK_EVENTS),
Expand Down
2 changes: 1 addition & 1 deletion state-sync/tests/test_harness.rs
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ impl StateSyncEnvironment {
let receiver_network_notif_tx = self.network_notifs_txs.get_mut(&receiver_id).unwrap();
receiver_network_notif_tx
.push(
(sender_peer_id, ProtocolId::StateSynchronizerDirectSend),
(sender_peer_id, ProtocolId::StateSyncDirectSend),
PeerManagerNotification::RecvMessage(sender_peer_id, msg.clone()),
)
.unwrap();
Expand Down
2 changes: 1 addition & 1 deletion testsuite/generate-format/tests/staged/network.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ ProtocolId:
2:
MempoolDirectSend: UNIT
3:
StateSynchronizerDirectSend: UNIT
StateSyncDirectSend: UNIT
4:
DiscoveryDirectSend: UNIT
5:
Expand Down

0 comments on commit 995d81e

Please sign in to comment.