mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 11:07:56 +00:00
Use sc_network::NetworkStateInfo instead of implementing redundant traits (#4436)
* Implement local_peer_id for gossip * refactor local_peer_id * fix * reset gossip * Update tests.rs * fix ci * fix review * fix Cargo.lock * fix Cargo.lock
This commit is contained in:
@@ -75,7 +75,7 @@ impl<Storage: OffchainStorage> OffchainExt for Api<Storage> {
|
||||
let external_addresses = self.network_state.external_addresses();
|
||||
|
||||
let state = NetworkState::new(
|
||||
self.network_state.peer_id(),
|
||||
self.network_state.local_peer_id(),
|
||||
external_addresses,
|
||||
);
|
||||
Ok(OpaqueNetworkState::from(state))
|
||||
@@ -292,7 +292,7 @@ mod tests {
|
||||
Vec::new()
|
||||
}
|
||||
|
||||
fn peer_id(&self) -> PeerId {
|
||||
fn local_peer_id(&self) -> PeerId {
|
||||
PeerId::random()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user