node: Rename 'hello' message to 'initialize'

Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
This commit is contained in:
Alexis Sellier
2022-09-15 14:05:22 +02:00
parent 381080a5a5
commit d3dd83447e
5 changed files with 22 additions and 23 deletions
+6 -6
View File
@@ -144,7 +144,7 @@ where
self.protocol.connected(remote, &local, Link::Inbound);
self.receive(
&remote,
Message::hello(
Message::init(
peer.node_id(),
self.local_time().as_secs(),
vec![Address::from(remote)],
@@ -153,8 +153,8 @@ where
);
let mut msgs = self.messages(&remote);
msgs.find(|m| matches!(m, Message::Hello { .. }))
.expect("`hello` is sent");
msgs.find(|m| matches!(m, Message::Initialize { .. }))
.expect("`initialize` is sent");
msgs.find(|m| matches!(m, Message::InventoryAnnouncement { .. }))
.expect("`inventory-announcement` is sent");
}
@@ -168,15 +168,15 @@ where
.connected(remote, &self.local_addr, Link::Outbound);
let mut msgs = self.messages(&remote);
msgs.find(|m| matches!(m, Message::Hello { .. }))
.expect("`hello` is sent");
msgs.find(|m| matches!(m, Message::Initialize { .. }))
.expect("`initialize` is sent");
msgs.find(|m| matches!(m, Message::InventoryAnnouncement { .. }))
.expect("`inventory-announcement` is sent");
let git = peer.config().git_url.clone();
self.receive(
&remote,
Message::hello(
Message::init(
peer.node_id(),
self.local_time().as_secs(),
peer.config().listen.clone(),
+1 -1
View File
@@ -112,7 +112,7 @@ fn test_handshake_invalid_timestamp() {
alice.connected(bob.addr(), &local, Link::Inbound);
alice.receive(
&bob.addr(),
Message::hello(
Message::init(
bob.node_id(),
alice.timestamp() - time_delta,
vec![],