remove some dead code attributes (#2820)
This commit is contained in:
parent
e5f5ac9ce8
commit
21a3e434bc
|
@ -96,13 +96,11 @@ pub struct Mempool {
|
||||||
active_state: ActiveState,
|
active_state: ActiveState,
|
||||||
|
|
||||||
/// Allows checking if we are near the tip to enable/disable the mempool.
|
/// Allows checking if we are near the tip to enable/disable the mempool.
|
||||||
#[allow(dead_code)]
|
|
||||||
sync_status: SyncStatus,
|
sync_status: SyncStatus,
|
||||||
|
|
||||||
/// Allow efficient access to the best tip of the blockchain.
|
/// Allow efficient access to the best tip of the blockchain.
|
||||||
latest_chain_tip: zs::LatestChainTip,
|
latest_chain_tip: zs::LatestChainTip,
|
||||||
/// Allows the detection of chain tip resets.
|
/// Allows the detection of chain tip resets.
|
||||||
#[allow(dead_code)]
|
|
||||||
chain_tip_change: ChainTipChange,
|
chain_tip_change: ChainTipChange,
|
||||||
|
|
||||||
/// Handle to the outbound service.
|
/// Handle to the outbound service.
|
||||||
|
@ -119,7 +117,6 @@ pub struct Mempool {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Mempool {
|
impl Mempool {
|
||||||
#[allow(dead_code)]
|
|
||||||
pub(crate) fn new(
|
pub(crate) fn new(
|
||||||
_network: Network,
|
_network: Network,
|
||||||
outbound: Outbound,
|
outbound: Outbound,
|
||||||
|
|
|
@ -51,7 +51,6 @@ impl Storage {
|
||||||
///
|
///
|
||||||
/// If its insertion results in evicting other transactions, they will be tracked
|
/// If its insertion results in evicting other transactions, they will be tracked
|
||||||
/// as [`State::Excess`].
|
/// as [`State::Excess`].
|
||||||
#[allow(dead_code)]
|
|
||||||
pub fn insert(&mut self, tx: UnminedTx) -> Result<UnminedTxId, MempoolError> {
|
pub fn insert(&mut self, tx: UnminedTx) -> Result<UnminedTxId, MempoolError> {
|
||||||
let tx_id = tx.id;
|
let tx_id = tx.id;
|
||||||
|
|
||||||
|
@ -101,7 +100,6 @@ impl Storage {
|
||||||
|
|
||||||
/// Returns `true` if a [`UnminedTx`] matching an [`UnminedTxId`] is in
|
/// Returns `true` if a [`UnminedTx`] matching an [`UnminedTxId`] is in
|
||||||
/// the mempool.
|
/// the mempool.
|
||||||
#[allow(dead_code)]
|
|
||||||
pub fn contains(&self, txid: &UnminedTxId) -> bool {
|
pub fn contains(&self, txid: &UnminedTxId) -> bool {
|
||||||
self.verified.iter().any(|tx| &tx.id == txid)
|
self.verified.iter().any(|tx| &tx.id == txid)
|
||||||
}
|
}
|
||||||
|
@ -112,7 +110,6 @@ impl Storage {
|
||||||
/// Removes from the 'verified' set, does not remove from the 'rejected'
|
/// Removes from the 'verified' set, does not remove from the 'rejected'
|
||||||
/// tracking set, if present. Maintains the order in which the other unmined
|
/// tracking set, if present. Maintains the order in which the other unmined
|
||||||
/// transactions have been inserted into the mempool.
|
/// transactions have been inserted into the mempool.
|
||||||
#[allow(dead_code)]
|
|
||||||
pub fn remove(&mut self, txid: &UnminedTxId) -> Option<UnminedTx> {
|
pub fn remove(&mut self, txid: &UnminedTxId) -> Option<UnminedTx> {
|
||||||
// If the txid exists in the verified set and is then deleted,
|
// If the txid exists in the verified set and is then deleted,
|
||||||
// `retain()` removes it and returns `Some(UnminedTx)`. If it's not
|
// `retain()` removes it and returns `Some(UnminedTx)`. If it's not
|
||||||
|
|
|
@ -1,6 +1,3 @@
|
||||||
// TODO: Remove this attribute once this type is used (#2603).
|
|
||||||
#![allow(dead_code)]
|
|
||||||
|
|
||||||
use tokio::sync::watch;
|
use tokio::sync::watch;
|
||||||
|
|
||||||
use super::RecentSyncLengths;
|
use super::RecentSyncLengths;
|
||||||
|
|
Loading…
Reference in New Issue