tx-pool: impl From<SubPool> for Destination (#12689)

This commit is contained in:
Thomas Coratger
2024-11-20 09:27:09 +01:00
committed by GitHub
parent 10caa9f846
commit 942ba7e823
2 changed files with 8 additions and 2 deletions

View File

@ -1328,7 +1328,7 @@ impl<T: PoolTransaction> AllTransactions<T> {
id: *tx.transaction.id(),
hash: *tx.transaction.hash(),
current: current_pool,
destination: Destination::Pool(tx.subpool),
destination: tx.subpool.into(),
})
}
}
@ -1738,7 +1738,7 @@ impl<T: PoolTransaction> AllTransactions<T> {
id: *id,
hash: *tx.transaction.hash(),
current: current_pool,
destination: Destination::Pool(tx.subpool),
destination: tx.subpool.into(),
})
}
}

View File

@ -26,3 +26,9 @@ pub(crate) enum Destination {
/// Move transaction to pool
Pool(SubPool),
}
impl From<SubPool> for Destination {
fn from(sub_pool: SubPool) -> Self {
Self::Pool(sub_pool)
}
}