mirror of
https://github.com/lightningdevkit/rust-lightning.git
synced 2025-03-15 15:39:09 +01:00
Fix various unused warnings in test and regular builds
This commit is contained in:
parent
f6a4505679
commit
4835b1697c
3 changed files with 4 additions and 3 deletions
|
@ -17,7 +17,7 @@ use crate::chain::chaininterface::LowerBoundedFeeEstimator;
|
|||
use crate::chain::channelmonitor;
|
||||
use crate::chain::channelmonitor::{CLTV_CLAIM_BUFFER, LATENCY_GRACE_PERIOD_BLOCKS, ANTI_REORG_DELAY};
|
||||
use crate::chain::transaction::OutPoint;
|
||||
use crate::sign::{ChannelSigner, EcdsaChannelSigner, EntropySource, SignerProvider};
|
||||
use crate::sign::{EcdsaChannelSigner, EntropySource, SignerProvider};
|
||||
use crate::events::{Event, MessageSendEvent, MessageSendEventsProvider, PathFailure, PaymentPurpose, ClosureReason, HTLCDestination, PaymentFailureReason};
|
||||
use crate::ln::{ChannelId, PaymentPreimage, PaymentSecret, PaymentHash};
|
||||
use crate::ln::channel::{commitment_tx_base_weight, COMMITMENT_TX_WEIGHT_PER_HTLC, CONCURRENT_INBOUND_HTLC_FEE_BUFFER, FEE_SPIKE_BUFFER_FEE_INCREASE_MULTIPLE, MIN_AFFORDABLE_HTLC_COUNT, get_holder_selected_channel_reserve_satoshis, OutboundV1Channel, InboundV1Channel, COINBASE_MATURITY, ChannelPhase};
|
||||
|
|
|
@ -209,7 +209,7 @@ fn test_lnd_bug_6039() {
|
|||
let mut nodes = create_network(2, &node_cfgs, &node_chanmgrs);
|
||||
let chan = create_announced_chan_between_nodes(&nodes, 0, 1);
|
||||
|
||||
let (payment_preimage, payment_hash, ..) = route_payment(&nodes[0], &[&nodes[1]], 100_000);
|
||||
let (payment_preimage, ..) = route_payment(&nodes[0], &[&nodes[1]], 100_000);
|
||||
|
||||
nodes[0].node.close_channel(&chan.2, &nodes[1].node.get_our_node_id()).unwrap();
|
||||
let node_0_shutdown = get_event_msg!(nodes[0], MessageSendEvent::SendShutdown, nodes[1].node.get_our_node_id());
|
||||
|
|
|
@ -62,7 +62,6 @@ use regex;
|
|||
use crate::io;
|
||||
use crate::prelude::*;
|
||||
use core::cell::RefCell;
|
||||
use core::ops::Deref;
|
||||
use core::time::Duration;
|
||||
use crate::sync::{Mutex, Arc};
|
||||
use core::sync::atomic::{AtomicBool, AtomicUsize, Ordering};
|
||||
|
@ -297,6 +296,7 @@ pub(crate) struct WatchtowerPersister {
|
|||
}
|
||||
|
||||
impl WatchtowerPersister {
|
||||
#[cfg(test)]
|
||||
pub(crate) fn new(destination_script: Script) -> Self {
|
||||
WatchtowerPersister {
|
||||
persister: TestPersister::new(),
|
||||
|
@ -306,6 +306,7 @@ impl WatchtowerPersister {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
pub(crate) fn justice_tx(&self, funding_txo: OutPoint, commitment_txid: &Txid)
|
||||
-> Option<Transaction> {
|
||||
self.watchtower_state.lock().unwrap().get(&funding_txo).unwrap().get(commitment_txid).cloned()
|
||||
|
|
Loading…
Add table
Reference in a new issue