mirror of
https://seed.radicle.dev/rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5.git
synced 2026-11-21 02:20:43 +08:00
node: Rename 'hello' message to 'initialize'
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
This commit is contained in:
@@ -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(),
|
||||
|
||||
@@ -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![],
|
||||
|
||||
Reference in New Issue
Block a user