2025-08-08 16:19:50 -03:00
|
|
|
use common::merkle_tree_public::TreeHashType;
|
2024-10-10 14:09:31 +03:00
|
|
|
use mempool::mempoolitem::MemPoolItem;
|
|
|
|
|
|
2025-07-14 15:45:20 -03:00
|
|
|
pub struct MempoolTransaction {
|
2025-08-07 15:19:06 -03:00
|
|
|
pub auth_tx: nssa::PublicTransaction,
|
2024-10-10 14:09:31 +03:00
|
|
|
}
|
|
|
|
|
|
2025-08-07 15:19:06 -03:00
|
|
|
impl From<nssa::PublicTransaction> for MempoolTransaction {
|
|
|
|
|
fn from(auth_tx: nssa::PublicTransaction) -> Self {
|
2025-07-16 11:54:11 -03:00
|
|
|
Self { auth_tx }
|
2025-04-16 16:17:53 +03:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2025-07-14 15:45:20 -03:00
|
|
|
impl MemPoolItem for MempoolTransaction {
|
2024-10-14 13:12:59 +03:00
|
|
|
type Identifier = TreeHashType;
|
2024-10-10 14:09:31 +03:00
|
|
|
|
|
|
|
|
fn identifier(&self) -> Self::Identifier {
|
2025-08-07 15:19:06 -03:00
|
|
|
self.auth_tx.hash()
|
2024-10-10 14:09:31 +03:00
|
|
|
}
|
|
|
|
|
}
|