mirror of
https://github.com/Cuprate/cuprate.git
synced 2025-01-09 12:29:45 +00:00
fix merge
This commit is contained in:
parent
e199b8c26d
commit
b8e96cffcb
5 changed files with 9 additions and 5 deletions
|
@ -98,6 +98,7 @@ impl Service<IncomingTxs> for IncomingTxHandler {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[expect(clippy::too_many_arguments)]
|
||||||
async fn handle_incoming_txs(
|
async fn handle_incoming_txs(
|
||||||
txs: Vec<Bytes>,
|
txs: Vec<Bytes>,
|
||||||
state: TxState<NetworkAddress>,
|
state: TxState<NetworkAddress>,
|
||||||
|
@ -117,7 +118,7 @@ async fn handle_incoming_txs(
|
||||||
.ready()
|
.ready()
|
||||||
.await
|
.await
|
||||||
.expect(PANIC_CRITICAL_SERVICE_ERROR)
|
.expect(PANIC_CRITICAL_SERVICE_ERROR)
|
||||||
.call(BlockChainContextRequest::GetContext)
|
.call(BlockChainContextRequest::Context)
|
||||||
.await
|
.await
|
||||||
.expect(PANIC_CRITICAL_SERVICE_ERROR)
|
.expect(PANIC_CRITICAL_SERVICE_ERROR)
|
||||||
else {
|
else {
|
||||||
|
@ -147,7 +148,7 @@ async fn handle_incoming_txs(
|
||||||
&mut txpool_write_handle,
|
&mut txpool_write_handle,
|
||||||
&mut dandelion_pool_manager,
|
&mut dandelion_pool_manager,
|
||||||
)
|
)
|
||||||
.await
|
.await;
|
||||||
}
|
}
|
||||||
|
|
||||||
for stem_tx in stem_pool_txs {
|
for stem_tx in stem_pool_txs {
|
||||||
|
|
|
@ -74,7 +74,7 @@ pub enum TxState<Id> {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<Id> TxState<Id> {
|
impl<Id> TxState<Id> {
|
||||||
pub fn state_stem(&self) -> bool {
|
pub const fn state_stem(&self) -> bool {
|
||||||
matches!(self, Self::Local | Self::Stem { .. })
|
matches!(self, Self::Local | Self::Stem { .. })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,10 @@ use std::{
|
||||||
|
|
||||||
use cuprate_types::TransactionVerificationData;
|
use cuprate_types::TransactionVerificationData;
|
||||||
|
|
||||||
use crate::{tx::TxEntry, types::{KeyImage, TransactionBlobHash, TransactionHash}};
|
use crate::{
|
||||||
|
tx::TxEntry,
|
||||||
|
types::{KeyImage, TransactionBlobHash, TransactionHash},
|
||||||
|
};
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------- TxpoolReadRequest
|
//---------------------------------------------------------------------------------------------------- TxpoolReadRequest
|
||||||
/// The transaction pool [`tower::Service`] read request type.
|
/// The transaction pool [`tower::Service`] read request type.
|
||||||
|
|
|
@ -4,7 +4,6 @@
|
||||||
clippy::unnecessary_wraps,
|
clippy::unnecessary_wraps,
|
||||||
reason = "TODO: finish implementing the signatures from <https://github.com/Cuprate/cuprate/pull/297>"
|
reason = "TODO: finish implementing the signatures from <https://github.com/Cuprate/cuprate/pull/297>"
|
||||||
)]
|
)]
|
||||||
|
|
||||||
use std::{
|
use std::{
|
||||||
collections::{HashMap, HashSet},
|
collections::{HashMap, HashSet},
|
||||||
sync::Arc,
|
sync::Arc,
|
||||||
|
|
|
@ -19,6 +19,7 @@ pub type TransactionHash = [u8; 32];
|
||||||
/// A transaction blob hash.
|
/// A transaction blob hash.
|
||||||
pub type TransactionBlobHash = [u8; 32];
|
pub type TransactionBlobHash = [u8; 32];
|
||||||
|
|
||||||
|
/// Information on the tx-pool.
|
||||||
#[derive(Copy, Clone, Debug, PartialEq, PartialOrd, Eq, Ord, Hash, Pod, Zeroable)]
|
#[derive(Copy, Clone, Debug, PartialEq, PartialOrd, Eq, Ord, Hash, Pod, Zeroable)]
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
pub struct PoolInfo {
|
pub struct PoolInfo {
|
||||||
|
|
Loading…
Reference in a new issue