Skip to content

Commit 95c83e8

Browse files
committed
f s/peers_trusted_0conf/trusted_peers_0conf
1 parent bb9e9b4 commit 95c83e8

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

bindings/ldk_node.udl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ dictionary Config {
1010
u64 wallet_sync_interval_secs;
1111
u64 fee_rate_cache_update_interval_secs;
1212
LogLevel log_level;
13-
sequence<PublicKey> peers_trusted_0conf;
13+
sequence<PublicKey> trusted_peers_0conf;
1414
};
1515

1616
interface Builder {

src/event.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,7 @@ where
553553
push_msat: _,
554554
} => {
555555
let user_channel_id: u128 = rand::thread_rng().gen::<u128>();
556-
let allow_0conf = self.config.peers_trusted_0conf.contains(&counterparty_node_id);
556+
let allow_0conf = self.config.trusted_peers_0conf.contains(&counterparty_node_id);
557557
let res = if allow_0conf {
558558
self.channel_manager.accept_inbound_channel_from_trusted_peer_0conf(
559559
&temporary_channel_id,

src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ const WALLET_KEYS_SEED_LEN: usize = 64;
224224
/// | `onchain_wallet_sync_interval_secs` | 60 |
225225
/// | `wallet_sync_interval_secs` | 20 |
226226
/// | `fee_rate_cache_update_interval_secs` | 600 |
227-
/// | `peers_trusted_0conf` | [] |
227+
/// | `trusted_peers_0conf` | [] |
228228
/// | `log_level` | `Debug` |
229229
///
230230
pub struct Config {
@@ -253,7 +253,7 @@ pub struct Config {
253253
/// **Note:** Allowing payments via zero-confirmation channels is potentially insecure if the
254254
/// funding transaction ends up never being confirmed on-chain. Zero-confirmation channels
255255
/// should therefore only be accepted from trusted peers.
256-
pub peers_trusted_0conf: Vec<PublicKey>,
256+
pub trusted_peers_0conf: Vec<PublicKey>,
257257
/// The level at which we log messages.
258258
///
259259
/// Any messages below this level will be excluded from the logs.
@@ -270,7 +270,7 @@ impl Default for Config {
270270
onchain_wallet_sync_interval_secs: DEFAULT_BDK_WALLET_SYNC_INTERVAL_SECS,
271271
wallet_sync_interval_secs: DEFAULT_LDK_WALLET_SYNC_INTERVAL_SECS,
272272
fee_rate_cache_update_interval_secs: DEFAULT_FEE_RATE_CACHE_UPDATE_INTERVAL_SECS,
273-
peers_trusted_0conf: Vec::new(),
273+
trusted_peers_0conf: Vec::new(),
274274
log_level: DEFAULT_LOG_LEVEL,
275275
}
276276
}
@@ -577,7 +577,7 @@ impl Builder {
577577
// Initialize the ChannelManager
578578
let mut user_config = UserConfig::default();
579579
user_config.channel_handshake_limits.force_announced_channel_preference = false;
580-
if !config.peers_trusted_0conf.is_empty() {
580+
if !config.trusted_peers_0conf.is_empty() {
581581
// Manually accept inbound channels if we expect 0conf channel requests, avoid
582582
// generating the events otherwise.
583583
user_config.manually_accept_inbound_channels = true;

src/test/functional_tests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ fn channel_full_cycle_0conf() {
4343

4444
println!("\n== Node B ==");
4545
let mut config_b = random_config();
46-
config_b.peers_trusted_0conf.push(node_a.node_id());
46+
config_b.trusted_peers_0conf.push(node_a.node_id());
4747

4848
let builder_b = Builder::from_config(config_b);
4949
builder_b.set_esplora_server(esplora_url.clone());

0 commit comments

Comments
 (0)