Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/chain/bitcoind.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1205,7 +1205,8 @@ impl BlockSource for BitcoindClient {

fn get_best_block<'a>(
&'a self,
) -> impl Future<Output = Result<(bitcoin::BlockHash, Option<u32>), BlockSourceError>> + 'a {
) -> impl Future<Output = Result<(bitcoin::BlockHash, Option<u32>), BlockSourceError>> + 'a
{
async move {
match self {
BitcoindClient::Rpc { rpc_client, .. } => rpc_client.get_best_block().await,
Expand Down
3 changes: 2 additions & 1 deletion src/io/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ pub(crate) fn read_or_generate_seed_file(
}

#[cfg(unix)]
let mut f = OpenOptions::new().write(true).create_new(true).mode(0o400).open(keys_seed_path)?;
let mut f =
OpenOptions::new().write(true).create_new(true).mode(0o400).open(keys_seed_path)?;

#[cfg(not(unix))]
let mut f = OpenOptions::new().write(true).create_new(true).open(keys_seed_path)?;
Expand Down
16 changes: 7 additions & 9 deletions src/payment/asynchronous/static_invoice_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,15 +97,13 @@ impl StaticInvoiceStore {
)
})
})
.or_else(
|e| {
if e.kind() == lightning::io::ErrorKind::NotFound {
Ok(None)
} else {
Err(e)
}
},
)
.or_else(|e| {
if e.kind() == lightning::io::ErrorKind::NotFound {
Ok(None)
} else {
Err(e)
}
})
}

pub(crate) async fn handle_persist_static_invoice(
Expand Down
3 changes: 2 additions & 1 deletion src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,8 @@ impl<T: KVStore + Send + Sync> DynStoreTrait for DynStoreWrapper<T> {

fn list_async(
&self, primary_namespace: &str, secondary_namespace: &str,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, bitcoin::io::Error>> + Send + 'static>> {
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, bitcoin::io::Error>> + Send + 'static>>
{
Box::pin(KVStore::list(&self.0, primary_namespace, secondary_namespace))
}
}
Expand Down
3 changes: 2 additions & 1 deletion tests/common/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1603,7 +1603,8 @@ pub(crate) async fn do_channel_full_cycle<E: ElectrumApi>(
+ invoice_amount_3_msat
+ determined_amount_msat
+ keysend_amount_msat)
/ 1000 - splice_out_sat;
/ 1000
- splice_out_sat;
let node_a_upper_bound_sat =
(premine_amount_sat - funding_amount_sat) + (funding_amount_sat - sum_of_all_payments_sat);
let node_a_lower_bound_sat = node_a_upper_bound_sat - onchain_fee_buffer_sat;
Expand Down
3 changes: 2 additions & 1 deletion tests/integration_tests_rust.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1535,7 +1535,8 @@ async fn async_payment() {
.filter(|n| {
node.network_graph().node(n).map_or(false, |info| info.announcement_info.is_some())
})
.count() >= 2
.count()
>= 2
};

// Wait for everyone to see all channels and node announcements.
Expand Down