mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 17:28:00 +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
@@ -99,9 +99,9 @@ fn two_nodes_transfer_lots_of_packets() {
|
||||
let fut1 = future::poll_fn(move || -> io::Result<_> {
|
||||
loop {
|
||||
match try_ready!(service1.poll()) {
|
||||
Some(ServiceEvent::OpenedCustomProtocol { node_index, .. }) => {
|
||||
Some(ServiceEvent::OpenedCustomProtocol { peer_id, .. }) => {
|
||||
for n in 0 .. NUM_PACKETS {
|
||||
service1.send_custom_message(node_index, vec![(n % 256) as u8]);
|
||||
service1.send_custom_message(&peer_id, vec![(n % 256) as u8]);
|
||||
}
|
||||
},
|
||||
_ => panic!(),
|
||||
@@ -227,9 +227,9 @@ fn basic_two_nodes_requests_in_parallel() {
|
||||
let fut1 = future::poll_fn(move || -> io::Result<_> {
|
||||
loop {
|
||||
match try_ready!(service1.poll()) {
|
||||
Some(ServiceEvent::OpenedCustomProtocol { node_index, .. }) => {
|
||||
Some(ServiceEvent::OpenedCustomProtocol { peer_id, .. }) => {
|
||||
for msg in to_send.drain(..) {
|
||||
service1.send_custom_message(node_index, msg);
|
||||
service1.send_custom_message(&peer_id, msg);
|
||||
}
|
||||
},
|
||||
_ => panic!(),
|
||||
|
||||
Reference in New Issue
Block a user