Skip to content

Commit

Permalink
return allowed_binaries
Browse files Browse the repository at this point in the history
  • Loading branch information
kmd-fl committed Sep 12, 2024
1 parent 87c7c2f commit 19b9085
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
7 changes: 5 additions & 2 deletions nox/src/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ use libp2p::{
use libp2p_connection_limits::ConnectionLimits;
use libp2p_metrics::{Metrics, Recorder};
use prometheus_client::registry::Registry;
use std::path::PathBuf;
use std::process::exit;
use std::sync::Arc;
use std::{io, net::SocketAddr};
Expand Down Expand Up @@ -394,8 +395,10 @@ impl<RT: AquaRuntime> Node<RT> {

let allowed_binaries = config
.allowed_effectors
.keys()
.map(|key| key.to_string())
.values()
.flat_map(|v| v.values().cloned().collect::<Vec<PathBuf>>())
.collect::<std::collections::HashSet<_>>()
.into_iter()
.collect::<_>();
let node_info = NodeInfo {
external_addresses: config.external_addresses(),
Expand Down
3 changes: 2 additions & 1 deletion particle-builtins/src/identify.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,15 @@
*/
use libp2p::core::Multiaddr;
use serde::Serialize;
use std::path::PathBuf;

#[derive(Serialize, Clone, Debug)]
pub struct NodeInfo {
pub external_addresses: Vec<Multiaddr>,
pub node_version: &'static str,
pub air_version: &'static str,
pub spell_version: String,
pub allowed_binaries: Vec<String>,
pub allowed_binaries: Vec<PathBuf>,
// Note: this is Vec for Aqua's representation of an option
#[serde(serialize_with = "serialize_aqua_option")]
pub vm_info: Option<VmInfo>,
Expand Down

0 comments on commit 19b9085

Please sign in to comment.