Struct ckb_app_config::RpcConfig
source · pub struct RpcConfig {
pub listen_address: String,
pub tcp_listen_address: Option<String>,
pub ws_listen_address: Option<String>,
pub max_request_body_size: usize,
pub threads: Option<usize>,
pub modules: Vec<Module>,
pub reject_ill_transactions: bool,
pub enable_deprecated_rpc: bool,
pub extra_well_known_lock_scripts: Vec<Script>,
pub extra_well_known_type_scripts: Vec<Script>,
}
Expand description
RPC config options.
Fields§
§listen_address: String
RPC server listen addresses.
tcp_listen_address: Option<String>
RPC TCP server listen addresses.
Only TCP and WS are supported to subscribe events via the Subscription RPC module.
ws_listen_address: Option<String>
RPC WS server listen addresses.
Only TCP and WS are supported to subscribe events via the Subscription RPC module.
max_request_body_size: usize
Max request body size in bytes.
threads: Option<usize>
Number of RPC worker threads.
modules: Vec<Module>
Enabled RPC modules.
reject_ill_transactions: bool
Rejects txs with scripts that might trigger known bugs
enable_deprecated_rpc: bool
Whether enable deprecated RPC methods.
Deprecated RPC methods are disabled by default.
extra_well_known_lock_scripts: Vec<Script>
Customized extra well known lock scripts.
extra_well_known_type_scripts: Vec<Script>
Customized extra well known type scripts.
Implementations§
source§impl Config
impl Config
sourcepub fn net_enable(&self) -> bool
pub fn net_enable(&self) -> bool
Checks whether the Net module is enabled.
sourcepub fn chain_enable(&self) -> bool
pub fn chain_enable(&self) -> bool
Checks whether the Chain module is enabled.
sourcepub fn miner_enable(&self) -> bool
pub fn miner_enable(&self) -> bool
Checks whether the Miner module is enabled.
sourcepub fn pool_enable(&self) -> bool
pub fn pool_enable(&self) -> bool
Checks whether the Pool module is enabled.
sourcepub fn experiment_enable(&self) -> bool
pub fn experiment_enable(&self) -> bool
Checks whether the Experiment module is enabled.
sourcepub fn stats_enable(&self) -> bool
pub fn stats_enable(&self) -> bool
Checks whether the Stats module is enabled.
sourcepub fn subscription_enable(&self) -> bool
pub fn subscription_enable(&self) -> bool
Checks whether the Subscription module is enabled.
sourcepub fn integration_test_enable(&self) -> bool
pub fn integration_test_enable(&self) -> bool
Checks whether the IntegrationTest module is enabled.
sourcepub fn alert_enable(&self) -> bool
pub fn alert_enable(&self) -> bool
Checks whether the Alert module is enabled.
sourcepub fn debug_enable(&self) -> bool
pub fn debug_enable(&self) -> bool
Checks whether the Debug module is enabled.
sourcepub fn indexer_enable(&self) -> bool
pub fn indexer_enable(&self) -> bool
Checks whether the Indexer module is enabled.