pub struct Arguments {
pub tx_cache_size: usize,
pub fetch_parallelism: usize,
pub bitcoind_addr: Option<SocketAddr>,
pub network: Option<Network>,
pub local_addr: Option<SocketAddr>,
pub other_network: Vec<Network>,
}Fields§
§tx_cache_size: usizeNumber of transaction kept in memory in a least recently used cache to reduce the number of requests of transactions to bitcoin core
fetch_parallelism: usizeSome requests to the bitcoin core are concurrent, this set the desired parallelism. Note there is a limit of open files that this setting too high could trigger. See https://github.com/bitcoin/bitcoin/blob/master/doc/REST-interface.md#risks
bitcoind_addr: Option<SocketAddr>default to “127.0.0.1:
network: Option<Network>default value: bitcoin
other possible values: testnet, signet
local_addr: Option<SocketAddr>The socket address this service will bind on. Default value depends on the network:
- mainnet: “127.0.0.1:3000”
- testnet: “127.0.0.1:3001”
- signet: “127.0.0.1:3002”
- regtest: “127.0.0.1:3003”
other_network: Vec<Network>If the setup involve multiple networks this must be set accordingly.
An header with a link to all the network is generated.
Links are prepended the network if it isn’t mainet (eg /testnet/t/xxx...)
Note the routes are still working without the network, it is duty of a frontend to redirect the
path to appropriate port. eg.
location = /testnet {
return 302 /testnet/;
}
location /testnet/ {
proxy_pass http://10.0.0.7:3001/;
}
Trait Implementations§
source§impl Args for Arguments
impl Args for Arguments
source§fn group_id() -> Option<Id>
fn group_id() -> Option<Id>
ArgGroup::id][crate::ArgGroup::id] for this set of argumentssource§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
source§impl FromArgMatches for Arguments
impl FromArgMatches for Arguments
source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches ) -> Result<Self, Error>
source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches ) -> Result<(), Error>
ArgMatches to self.source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches ) -> Result<(), Error>
ArgMatches to self.source§impl Parser for Arguments
impl Parser for Arguments
§fn try_parse() -> Result<Self, Error<RichFormatter>>
fn try_parse() -> Result<Self, Error<RichFormatter>>
std::env::args_os(), return Err on error.