Skip to content

Commit 86a1313

Browse files
ii-cruzjsdanielh
authored andcommitted
rpc-client: Add network command for getting address book
1 parent 44fbacc commit 86a1313

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

rpc-client/src/subcommands/network_subcommands.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ pub enum NetworkCommand {
1717
#[clap(short, long)]
1818
count: bool,
1919
},
20+
21+
/// Returns a list of known peers (peer ID and its stored information).
22+
AddressBook {},
2023
}
2124

2225
#[async_trait]
@@ -33,6 +36,9 @@ impl HandleSubcommand for NetworkCommand {
3336
println!("{:#?}", client.network.get_peer_list().await?);
3437
}
3538
}
39+
NetworkCommand::AddressBook {} => {
40+
println!("{:#?}", client.network.get_address_book().await?);
41+
}
3642
}
3743
Ok(client)
3844
}

0 commit comments

Comments
 (0)