introduced a flag to accept toc and exposed it via self-described API
This commit is contained in:
@@ -293,6 +293,8 @@ impl From<WireguardData> for nym_wireguard::WireguardData {
|
||||
|
||||
pub(crate) struct NymNode {
|
||||
config: Config,
|
||||
accepted_toc: bool,
|
||||
|
||||
description: NodeDescription,
|
||||
|
||||
// TODO: currently we're only making measurements in 'mixnode' mode; this should be changed
|
||||
@@ -392,9 +394,15 @@ impl NymNode {
|
||||
exit_gateway: ExitGatewayData::new(&config.exit_gateway)?,
|
||||
wireguard: wireguard_data,
|
||||
config,
|
||||
accepted_toc: false,
|
||||
})
|
||||
}
|
||||
|
||||
pub(crate) fn with_accepted_toc(mut self, accepted_toc: bool) -> Self {
|
||||
self.accepted_toc = accepted_toc;
|
||||
self
|
||||
}
|
||||
|
||||
fn exit_network_requester_address(&self) -> Recipient {
|
||||
Recipient::new(
|
||||
self.exit_gateway.nr_ed25519,
|
||||
@@ -530,6 +538,7 @@ impl NymNode {
|
||||
|
||||
let auxiliary_details = api_requests::v1::node::models::AuxiliaryDetails {
|
||||
location: self.config.host.location,
|
||||
accepted_toc: self.accepted_toc,
|
||||
};
|
||||
|
||||
// mixnode info
|
||||
|
||||
Reference in New Issue
Block a user