Skip to content

Commit

Permalink
tx-pool: impl From<SubPool> for Destination
Browse files Browse the repository at this point in the history
  • Loading branch information
tcoratger committed Nov 19, 2024
1 parent 02a90e1 commit 4e91232
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/transaction-pool/src/pool/txpool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
})
}
}
Expand Down Expand Up @@ -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(),
})
}
}
Expand Down
6 changes: 6 additions & 0 deletions crates/transaction-pool/src/pool/update.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

0 comments on commit 4e91232

Please sign in to comment.