Skip to content

Commit

Permalink
add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
chenyukang committed Oct 23, 2023
1 parent 3a2f603 commit 326cc87
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tx-pool/src/process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,9 @@ impl TxPoolService {
self.orphan.write().await.remove_orphan_tx(id);
}

/// Remove all orphans which are resolved by the given transaction
/// the process is like a breath first search, if there is a cycle in `orphan_queue`,
/// `_process_tx` will return `Reject` since we have checked duplicated tx
pub(crate) async fn process_orphan_tx(&self, tx: &TransactionView) {
let mut orphan_queue: VecDeque<TransactionView> = VecDeque::new();
orphan_queue.push_back(tx.clone());
Expand Down

0 comments on commit 326cc87

Please sign in to comment.