Skip to content

Commit

Permalink
changed file name from rec.rs to kad.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
ndkazu committed Nov 2, 2024
1 parent fc34928 commit 0df8b33
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion substrate/client/authority-discovery/src/worker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ use addr_cache::AddrCache;
use codec::{Decode, Encode};
use ip_network::IpNetwork;
use linked_hash_set::LinkedHashSet;
use sc_network_types::rec::{Key, PeerRecord, Record};
use sc_network_types::kad::{Key, PeerRecord, Record};

use log::{debug, error, trace};
use prometheus_endpoint::{register, Counter, CounterVec, Gauge, Opts, U64};
Expand Down
2 changes: 1 addition & 1 deletion substrate/client/authority-discovery/src/worker/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ use sc_network::{
};
use sc_network_types::{
multiaddr::{Multiaddr, Protocol},
rec::Key as KademliaKey,
kad::Key as KademliaKey,
PeerId,
};
use sp_api::{ApiRef, ProvideRuntimeApi};
Expand Down
2 changes: 1 addition & 1 deletion substrate/client/network/src/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ use bytes::Bytes;

use sc_network_common::role::ObservedRole;
use sc_network_types::{
rec::{Key, PeerRecord},
kad::{Key, PeerRecord},
PeerId,
};

Expand Down
8 changes: 4 additions & 4 deletions substrate/client/network/src/litep2p/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -863,7 +863,7 @@ impl<B: BlockT + 'static, H: ExHashT> NetworkBackend<B, H> for Litep2pNetworkBac
);

self.event_streams.send(Event::Dht(
DhtEvent::ValuePut(sc_network_types::rec::Key::new::<sc_network_types::rec::Key>(&key.to_vec().into()))
DhtEvent::ValuePut(sc_network_types::kad::Key::new::<sc_network_types::kad::Key>(&key.to_vec().into()))
));

if let Some(ref metrics) = self.metrics {
Expand All @@ -889,7 +889,7 @@ impl<B: BlockT + 'static, H: ExHashT> NetworkBackend<B, H> for Litep2pNetworkBac
);

self.event_streams.send(Event::Dht(
DhtEvent::ValuePutFailed(sc_network_types::rec::Key::new::<sc_network_types::rec::Key>(&key.to_vec().into()))
DhtEvent::ValuePutFailed(sc_network_types::kad::Key::new::<sc_network_types::kad::Key>(&key.to_vec().into()))
));

if let Some(ref metrics) = self.metrics {
Expand All @@ -907,7 +907,7 @@ impl<B: BlockT + 'static, H: ExHashT> NetworkBackend<B, H> for Litep2pNetworkBac
);

self.event_streams.send(Event::Dht(
DhtEvent::ValueNotFound(sc_network_types::rec::Key::new::<sc_network_types::rec::Key>(&key.to_vec().into()))
DhtEvent::ValueNotFound(sc_network_types::kad::Key::new::<sc_network_types::kad::Key>(&key.to_vec().into()))
));

if let Some(ref metrics) = self.metrics {
Expand Down Expand Up @@ -963,7 +963,7 @@ impl<B: BlockT + 'static, H: ExHashT> NetworkBackend<B, H> for Litep2pNetworkBac
Some(DiscoveryEvent::IncomingRecord { record: Record { key, value, publisher, expires }} ) => {
self.event_streams.send(Event::Dht(
DhtEvent::PutRecordRequest(
sc_network_types::rec::Key::new::<sc_network_types::rec::Key>(&key.to_vec().into()),
sc_network_types::kad::Key::new::<sc_network_types::kad::Key>(&key.to_vec().into()),
value,
publisher.map(Into::into),
expires,
Expand Down
2 changes: 1 addition & 1 deletion substrate/client/network/src/litep2p/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ use litep2p::{
types::multiaddr::Multiaddr as LiteP2pMultiaddr,
};
use parking_lot::RwLock;
use sc_network_types::rec::{Key as KademliaKey, Record};
use sc_network_types::kad::{Key as KademliaKey, Record};

use sc_network_common::{
role::{ObservedRole, Roles},
Expand Down
2 changes: 1 addition & 1 deletion substrate/client/network/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ use log::{debug, error, info, trace, warn};
use metrics::{Histogram, MetricSources, Metrics};
use parking_lot::Mutex;
use prometheus_endpoint::Registry;
use sc_network_types::rec::{Key as KademliaKey, Record};
use sc_network_types::kad::{Key as KademliaKey, Record};

use sc_client_api::BlockBackend;
use sc_network_common::{
Expand Down
2 changes: 1 addition & 1 deletion substrate/client/network/src/service/traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ use sc_client_api::BlockBackend;
use sc_network_common::{role::ObservedRole, ExHashT};
pub use sc_network_types::{
multiaddr::Multiaddr,
rec::{Key as KademliaKey, Record},
kad::{Key as KademliaKey, Record},
PeerId,
};
use sp_runtime::traits::Block as BlockT;
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion substrate/client/network/types/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ pub mod ed25519;
pub mod multiaddr;
pub mod multihash;
mod peer_id;
pub mod rec;
pub mod kad;
pub use peer_id::PeerId;

0 comments on commit 0df8b33

Please sign in to comment.