mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-29 02:07:56 +00:00
Replace NodeIndex with PeerId everywhere (#2077)
* Replace NodeIndex with PeerId * Fix tests * More test fixing * Whitespace
This commit is contained in:
committed by
Arkadiy Paronyan
parent
6fa40ec199
commit
6e394464b8
@@ -16,7 +16,7 @@
|
||||
|
||||
use super::*;
|
||||
|
||||
use network::{self, ProtocolStatus, NodeIndex, PeerId, PeerInfo as NetworkPeerInfo};
|
||||
use network::{self, ProtocolStatus, PeerId, PeerInfo as NetworkPeerInfo};
|
||||
use network::config::Roles;
|
||||
use test_client::runtime::Block;
|
||||
use assert_matches::assert_matches;
|
||||
@@ -57,12 +57,11 @@ impl network::SyncProvider<Block> for Status {
|
||||
}
|
||||
}
|
||||
|
||||
fn peers(&self) -> Vec<(NodeIndex, NetworkPeerInfo<Block>)> {
|
||||
fn peers(&self) -> Vec<(PeerId, NetworkPeerInfo<Block>)> {
|
||||
let mut peers = vec![];
|
||||
for _peer in 0..self.peers {
|
||||
peers.push(
|
||||
(1, NetworkPeerInfo {
|
||||
peer_id: self.peer_id.clone(),
|
||||
(self.peer_id.clone(), NetworkPeerInfo {
|
||||
roles: Roles::FULL,
|
||||
protocol_version: 1,
|
||||
best_hash: Default::default(),
|
||||
@@ -187,7 +186,6 @@ fn system_peers() {
|
||||
is_dev: true,
|
||||
}).system_peers().unwrap(),
|
||||
vec![PeerInfo {
|
||||
index: 1,
|
||||
peer_id: peer_id.to_base58(),
|
||||
roles: "FULL".into(),
|
||||
protocol_version: 1,
|
||||
|
||||
Reference in New Issue
Block a user