mirror of
https://github.com/hinto-janai/cuprate.git
synced 2024-12-23 03:59:37 +00:00
fix bin
This commit is contained in:
parent
6453daefec
commit
3972f4204a
2 changed files with 2 additions and 20 deletions
|
@ -8,7 +8,7 @@ use tower::ServiceExt;
|
||||||
use cuprate_helper::cast::usize_to_u64;
|
use cuprate_helper::cast::usize_to_u64;
|
||||||
use cuprate_p2p_core::{
|
use cuprate_p2p_core::{
|
||||||
services::{AddressBookRequest, AddressBookResponse},
|
services::{AddressBookRequest, AddressBookResponse},
|
||||||
types::BanState,
|
types::{BanState, ConnectionId},
|
||||||
AddressBook, NetworkZone,
|
AddressBook, NetworkZone,
|
||||||
};
|
};
|
||||||
use cuprate_pruning::PruningSeed;
|
use cuprate_pruning::PruningSeed;
|
||||||
|
|
|
@ -11,7 +11,7 @@ use cuprate_txpool::{
|
||||||
interface::{TxpoolReadRequest, TxpoolReadResponse},
|
interface::{TxpoolReadRequest, TxpoolReadResponse},
|
||||||
TxpoolReadHandle,
|
TxpoolReadHandle,
|
||||||
},
|
},
|
||||||
BlockTemplateTxEntry, TxEntry,
|
TxEntry,
|
||||||
};
|
};
|
||||||
|
|
||||||
// FIXME: use `anyhow::Error` over `tower::BoxError` in txpool.
|
// 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)
|
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`]
|
/// [`TxpoolReadRequest::Size`]
|
||||||
pub(crate) async fn size(
|
pub(crate) async fn size(
|
||||||
txpool_read: &mut TxpoolReadHandle,
|
txpool_read: &mut TxpoolReadHandle,
|
||||||
|
|
Loading…
Reference in a new issue