ckb_app_config/configs/network_alert.rs
1use ckb_jsonrpc_types::JsonBytes;
2use serde::{Deserialize, Serialize};
3
4/// Network alert config options.
5#[derive(Clone, Debug, Serialize, Deserialize)]
6#[serde(deny_unknown_fields)]
7pub struct Config {
8 /// The minimum number of required signatures to send a network alert.
9 pub signatures_threshold: usize,
10 /// The public keys of all the network alert signers.
11 pub public_keys: Vec<JsonBytes>,
12}
13
14impl Default for Config {
15 fn default() -> Self {
16 let alert_config = include_bytes!("./alert_signature.toml");
17 toml::from_slice(&alert_config[..]).expect("alert system config")
18 }
19}