Skip to content

Commit

Permalink
chore: Fix clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
holzeis committed Feb 21, 2024
1 parent d783019 commit 6a45af3
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 15 deletions.
2 changes: 1 addition & 1 deletion dlc-manager/src/manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ macro_rules! check_for_timed_out_channels {
if let SignedChannelState::$state { timeout, .. } = channel.state {
let is_timed_out = timeout < $manager.time.unix_time_now();
if is_timed_out {
let sub_channel: Option<SubChannel> = if channel.is_sub_channel() {
let _sub_channel: Option<SubChannel> = if channel.is_sub_channel() {
log::info!(
"Skipping force-closure of subchannel {}: not supported",
bitcoin::hashes::hex::ToHex::to_hex(&channel.channel_id[..])
Expand Down
16 changes: 8 additions & 8 deletions dlc-manager/tests/ln_dlc_channel_execution_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ use crate::test_utils::{
get_enum_test_params_custom_collateral, refresh_wallet, TestParams, EVENT_MATURITY,
};
use bitcoin::{
hashes::Hash, Address, Amount, Network, PackedLockTime, Script, Sequence, Transaction, TxIn,
TxOut, Witness,
hashes::Hash, Address, Amount, Network, PackedLockTime, Transaction, TxIn,
TxOut,
};
use bitcoin_bech32::WitnessProgram;
use bitcoin_test_utils::rpc_helpers::init_clients;
Expand All @@ -24,7 +24,7 @@ use console_logger::ConsoleLogger;
use custom_signer::{CustomKeysManager, CustomSigner};
use dlc_manager::{
channel::Channel, contract::Contract, manager::Manager, sub_channel_manager::SubChannelManager,
subchannel::SubChannelState, Blockchain, DlcChannelId, Oracle, Signer, Storage, Utxo, Wallet,
subchannel::SubChannelState, Blockchain, DlcChannelId, Oracle, Storage, Utxo, Wallet,
};
use dlc_messages::{
sub_channel::{SubChannelAccept, SubChannelOffer},
Expand Down Expand Up @@ -289,8 +289,8 @@ impl EventHandler for LnDlcParty {
fn handle_event(&self, event: lightning::events::Event) {
match event {
Event::FundingGenerationReady {
temporary_channel_id,
counterparty_node_id,
temporary_channel_id: _,
counterparty_node_id: _,
channel_value_satoshis,
output_script,
..
Expand Down Expand Up @@ -339,9 +339,9 @@ impl EventHandler for LnDlcParty {
todo!();

// Give the funding transaction back to LDK for opening the channel.
self.channel_manager
.funding_transaction_generated(&temporary_channel_id, &counterparty_node_id, tx)
.unwrap();
// self.channel_manager
// .funding_transaction_generated(&temporary_channel_id, &counterparty_node_id, tx)
// .unwrap();
}
Event::PendingHTLCsForwardable { .. } => {
self.channel_manager.process_pending_htlc_forwards();
Expand Down
2 changes: 1 addition & 1 deletion mocks/src/mock_wallet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ impl Wallet for MockWallet {
Ok(())
}

fn unreserve_utxos(&self, outpoints: &[OutPoint]) -> Result<(), Error> {
fn unreserve_utxos(&self, _outpoints: &[OutPoint]) -> Result<(), Error> {
Ok(())
}
}
Expand Down
5 changes: 0 additions & 5 deletions simple-wallet/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
use std::ops::Deref;

use bdk::{
database::{BatchOperations, Database},
wallet::coin_selection::{BranchAndBoundCoinSelection, CoinSelectionAlgorithm},
FeeRate, KeychainKind, LocalUtxo, Utxo as BdkUtxo, WeightedUtxo,
};
use bitcoin::psbt::PartiallySignedTransaction;
use bitcoin::{Address, Network, PackedLockTime, Script, Sequence, Transaction, TxIn, TxOut, Txid, Witness, OutPoint};
use dlc_manager::{error::Error, Blockchain, Signer, Utxo, Wallet};
Expand Down

0 comments on commit 6a45af3

Please sign in to comment.