Skip to content

Commit b991c33

Browse files
committed
chore: rename autonat behaviour
1 parent d50b49b commit b991c33

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const CALIMERO_KAD_PROTO_NAME: StreamProtocol = StreamProtocol::new("/calimero/k
1515

1616
#[derive(NetworkBehaviour)]
1717
struct Behaviour {
18-
auto_nat: autonat::Behaviour,
18+
autonat: autonat::Behaviour,
1919
identify: identify::Behaviour,
2020
kad: kad::Behaviour<kad::store::MemoryStore>,
2121
ping: ping::Behaviour,
@@ -64,7 +64,7 @@ async fn main() -> eyre::Result<()> {
6464
)?
6565
.with_quic()
6666
.with_behaviour(|keypair| Behaviour {
67-
auto_nat: autonat::Behaviour::new(peer_id.clone(), Default::default()),
67+
autonat: autonat::Behaviour::new(peer_id.clone(), Default::default()),
6868
identify: identify::Behaviour::new(identify::Config::new(
6969
PROTOCOL_VERSION.to_owned(),
7070
keypair.public(),
@@ -131,7 +131,7 @@ async fn handle_swarm_event(swarm: &mut Swarm<Behaviour>, event: SwarmEvent<Beha
131131

132132
async fn handle_swarm_behaviour_event(swarm: &mut Swarm<Behaviour>, event: BehaviourEvent) {
133133
match event {
134-
BehaviourEvent::AutoNat(event) => {
134+
BehaviourEvent::Autonat(event) => {
135135
info!("AutoNat event: {event:?}");
136136
}
137137
BehaviourEvent::Identify(event) => {

0 commit comments

Comments
 (0)