mirror of
https://github.com/waku-org/waku-rust-bindings.git
synced 2025-02-02 01:45:01 +00:00
Add relay topics config entry
This commit is contained in:
parent
53c4c9afea
commit
f3655e79ca
@ -4,6 +4,7 @@ use std::fmt::{Display, Formatter};
|
|||||||
use std::str::FromStr;
|
use std::str::FromStr;
|
||||||
// std
|
// std
|
||||||
// crates
|
// crates
|
||||||
|
use crate::WakuPubSubTopic;
|
||||||
use multiaddr::Multiaddr;
|
use multiaddr::Multiaddr;
|
||||||
use secp256k1::SecretKey;
|
use secp256k1::SecretKey;
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
@ -33,6 +34,8 @@ pub struct WakuNodeConfig {
|
|||||||
/// Enable relay protocol. Default `true`
|
/// Enable relay protocol. Default `true`
|
||||||
#[default(Some(true))]
|
#[default(Some(true))]
|
||||||
pub relay: Option<bool>,
|
pub relay: Option<bool>,
|
||||||
|
#[serde(default)]
|
||||||
|
pub relay_topics: Vec<WakuPubSubTopic>,
|
||||||
/// The minimum number of peers required on a topic to allow broadcasting a message. Default `0`
|
/// The minimum number of peers required on a topic to allow broadcasting a message. Default `0`
|
||||||
#[default(Some(0))]
|
#[default(Some(0))]
|
||||||
pub min_peers_to_publish: Option<usize>,
|
pub min_peers_to_publish: Option<usize>,
|
||||||
@ -47,7 +50,7 @@ pub struct WakuNodeConfig {
|
|||||||
#[serde(rename = "discV5")]
|
#[serde(rename = "discV5")]
|
||||||
pub discv5: Option<bool>,
|
pub discv5: Option<bool>,
|
||||||
/// Array of bootstrap nodes ENR.
|
/// Array of bootstrap nodes ENR.
|
||||||
#[serde(rename = "discV5BootstrapNodes")]
|
#[serde(rename = "discV5BootstrapNodes", default)]
|
||||||
pub discv5_bootstrap_nodes: Vec<String>,
|
pub discv5_bootstrap_nodes: Vec<String>,
|
||||||
/// UDP port for DiscoveryV5. Default `9000`.
|
/// UDP port for DiscoveryV5. Default `9000`.
|
||||||
#[default(Some(9000))]
|
#[default(Some(9000))]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user