Conversation
|
👋 Thanks for assigning @benthecarman as a reviewer! |
e107189 to
693beec
Compare
| #[derive(Debug)] | ||
| pub enum ChainSource { | ||
| Rpc { rpc_address: SocketAddr, rpc_user: String, rpc_password: String }, | ||
| Esplora { server_url: SocketAddr }, |
There was a problem hiding this comment.
I don't think socketaddr works with urls which is what most people will be using with this.
There was a problem hiding this comment.
Right it does not, initially had String, went with SocketAddr for consistency with RPC, now switched back to String
| rpc_password = "bitcoind-testpassword" | ||
|
|
||
| [esplora] | ||
| server_url = "127.0.0.1:3000" |
There was a problem hiding this comment.
would be better to make this and all the other hard coded values to something like mempool space or blockstream, will make this easier for people to understand at a quick glance
| ); | ||
| }, | ||
| ChainSource::Esplora { server_url } => { | ||
| builder.set_chain_source_esplora(format!("http://{}", server_url), None); |
There was a problem hiding this comment.
we should make them include the http vs https
693beec to
77f2baa
Compare
| SocketAddr::from_str(&toml_config.bitcoind.rpc_address).map_err(|e| { | ||
| io::Error::new( | ||
| let chain_source = match (toml_config.esplora, toml_config.bitcoind) { | ||
| (Some(EsploraConfig { server_url }), _) => ChainSource::Esplora { server_url }, |
There was a problem hiding this comment.
imo it'd be better to throw an error if both are set. Setting both options is likely an error and could lead to them using a config they dont expect
| dir_path = "/tmp/ldk-server/" # Path for LDK and BDK data persistence | ||
|
|
||
|
|
||
| # Must set either the bitcoind or the esplora table; the esplora table is prioritized over the bitcoind table |
There was a problem hiding this comment.
would need to update this comment too
77f2baa to
d177d06
Compare
sorry pushed some more work and missed your review addressing now |
d177d06 to
cd0b6ea
Compare
No description provided.