This commit is contained in:
hinto.janai 2024-10-30 21:20:37 -04:00
parent 6453daefec
commit 3972f4204a
No known key found for this signature in database
GPG key ID: D47CE05FA175A499
2 changed files with 2 additions and 20 deletions

View file

@ -8,7 +8,7 @@ use tower::ServiceExt;
use cuprate_helper::cast::usize_to_u64;
use cuprate_p2p_core::{
services::{AddressBookRequest, AddressBookResponse},
types::BanState,
types::{BanState, ConnectionId},
AddressBook, NetworkZone,
};
use cuprate_pruning::PruningSeed;

View file

@ -11,7 +11,7 @@ use cuprate_txpool::{
interface::{TxpoolReadRequest, TxpoolReadResponse},
TxpoolReadHandle,
},
BlockTemplateTxEntry, TxEntry,
TxEntry,
};
// FIXME: use `anyhow::Error` over `tower::BoxError` in txpool.
@ -32,24 +32,6 @@ pub(crate) async fn backlog(txpool_read: &mut TxpoolReadHandle) -> Result<Vec<Tx
Ok(tx_entries)
}
/// [`TxpoolReadRequest::BlockTemplateBacklog`]
pub(crate) async fn block_template_backlog(
txpool_read: &mut TxpoolReadHandle,
) -> Result<Vec<BlockTemplateTxEntry>, Error> {
let TxpoolReadResponse::BlockTemplateBacklog(tx_entries) = txpool_read
.ready()
.await
.map_err(|e| anyhow!(e))?
.call(TxpoolReadRequest::BlockTemplateBacklog)
.await
.map_err(|e| anyhow!(e))?
else {
unreachable!();
};
Ok(tx_entries)
}
/// [`TxpoolReadRequest::Size`]
pub(crate) async fn size(
txpool_read: &mut TxpoolReadHandle,