-
Notifications
You must be signed in to change notification settings - Fork 0
dns bootstrap #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| [bitcoind] | ||
| rpc_host = "127.0.0.1" | ||
| rpc_port = 8332 | ||
| rpc_username = "your_rpc_user" | ||
| rpc_password = "your_rpc_password" | ||
|
|
||
| network = "testnet" | ||
|
|
||
| [ldk] | ||
| peer_listening_port = 9735 | ||
| announced_node_name = "MyLDKNode" | ||
| announced_listen_addr = [] | ||
|
|
||
| [rapid_gossip_sync] | ||
| enabled = true | ||
| url = "https://rapidsync.lightningdevkit.org/snapshot/" | ||
| interval_hours = 6 | ||
|
|
||
| [probing] | ||
| interval_sec = 300 | ||
| peers = [ | ||
| "02abc123...@1.2.3.4:9735" | ||
| ] | ||
| amount_msats = [1000, 10000, 100000, 1000000] | ||
| timeout_sec = 60 | ||
| probe_delay_sec = 1 | ||
| peer_delay_sec = 2 | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -239,10 +239,7 @@ impl BitcoindClient { | |
| pub async fn create_raw_transaction(&self, outputs: Vec<HashMap<String, f64>>) -> RawTx { | ||
| let outputs_json = serde_json::json!(outputs); | ||
| self.bitcoind_rpc_client | ||
| .call_method::<RawTx>( | ||
| "createrawtransaction", | ||
| &[serde_json::json!([]), outputs_json], | ||
| ) | ||
| .call_method::<RawTx>("createrawtransaction", &[serde_json::json!([]), outputs_json]) | ||
| .await | ||
| .unwrap() | ||
| } | ||
|
|
@@ -282,10 +279,7 @@ impl BitcoindClient { | |
| let tx_hex_json = serde_json::json!(tx_hex); | ||
| let rpc_client = self.get_new_rpc_client(); | ||
| async move { | ||
| rpc_client | ||
| .call_method("signrawtransactionwithwallet", &[tx_hex_json]) | ||
| .await | ||
| .unwrap() | ||
| rpc_client.call_method("signrawtransactionwithwallet", &[tx_hex_json]).await.unwrap() | ||
|
Comment on lines
-285
to
+282
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: would be nice pick a formatting tool and setup a rule so AI always runs the formatter before commits, so that formatting changes are "right from the start" and don't change arbitrarily with each PR, unless actual code changes warrant new formatting 👍🏻
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. thanks! |
||
| } | ||
| } | ||
|
|
||
|
|
@@ -309,9 +303,7 @@ impl BitcoindClient { | |
|
|
||
| pub fn list_unspent(&self) -> impl Future<Output = ListUnspentResponse> { | ||
| let rpc_client = self.get_new_rpc_client(); | ||
| async move { | ||
| rpc_client.call_method::<ListUnspentResponse>("listunspent", &[]).await.unwrap() | ||
| } | ||
| async move { rpc_client.call_method::<ListUnspentResponse>("listunspent", &[]).await.unwrap() } | ||
| } | ||
| } | ||
|
|
||
|
|
@@ -392,7 +384,7 @@ impl WalletSource for BitcoindClient { | |
| value, | ||
| script_pubkey: utxo.address.script_pubkey(), | ||
| }, | ||
| satisfaction_weight: WITNESS_SCALE_FACTOR as u64 + | ||
| satisfaction_weight: WITNESS_SCALE_FACTOR as u64 + | ||
| 1 /* witness items */ + 1 /* schnorr sig len */ + 64, /* schnorr sig */ | ||
| }) | ||
| .ok() | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The dns_bootstrap configuration section is missing from this example file. According to the config.rs changes (lines 249-254), the example should include a [dns_bootstrap] section with fields: enabled, seeds, timeout_secs, num_peers, and interval_secs. This omission makes the example incomplete and inconsistent with the documentation in config.rs.