remove some dead code attributes (#2820)

This commit is contained in:
Alfredo Garcia 2021-10-01 15:59:59 -03:00 committed by GitHub
parent e5f5ac9ce8
commit 21a3e434bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 0 additions and 9 deletions

View File

@ -96,13 +96,11 @@ pub struct Mempool {
active_state: ActiveState,
/// Allows checking if we are near the tip to enable/disable the mempool.
#[allow(dead_code)]
sync_status: SyncStatus,
/// Allow efficient access to the best tip of the blockchain.
latest_chain_tip: zs::LatestChainTip,
/// Allows the detection of chain tip resets.
#[allow(dead_code)]
chain_tip_change: ChainTipChange,
/// Handle to the outbound service.
@ -119,7 +117,6 @@ pub struct Mempool {
}
impl Mempool {
#[allow(dead_code)]
pub(crate) fn new(
_network: Network,
outbound: Outbound,

View File

@ -51,7 +51,6 @@ impl Storage {
///
/// If its insertion results in evicting other transactions, they will be tracked
/// as [`State::Excess`].
#[allow(dead_code)]
pub fn insert(&mut self, tx: UnminedTx) -> Result<UnminedTxId, MempoolError> {
let tx_id = tx.id;
@ -101,7 +100,6 @@ impl Storage {
/// Returns `true` if a [`UnminedTx`] matching an [`UnminedTxId`] is in
/// the mempool.
#[allow(dead_code)]
pub fn contains(&self, txid: &UnminedTxId) -> bool {
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'
/// tracking set, if present. Maintains the order in which the other unmined
/// transactions have been inserted into the mempool.
#[allow(dead_code)]
pub fn remove(&mut self, txid: &UnminedTxId) -> Option<UnminedTx> {
// If the txid exists in the verified set and is then deleted,
// `retain()` removes it and returns `Some(UnminedTx)`. If it's not

View File

@ -1,6 +1,3 @@
// TODO: Remove this attribute once this type is used (#2603).
#![allow(dead_code)]
use tokio::sync::watch;
use super::RecentSyncLengths;