Skip to content

Commit 3c92b0b

Browse files
ltitanbBrycePy
andauthored
fix: TxList bug (#245) (#246)
Co-authored-by: Suthiwat Umpornpaiboon <91750004+BrycePy@users.noreply.github.com>
1 parent 40ac6d7 commit 3c92b0b

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

based/crates/common/src/transaction/tx_list.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,12 @@ impl TxList {
4949
if self.txs.front().is_some_and(|t| t.nonce() > nonce) {
5050
return false;
5151
}
52-
while let Some(t) = self.txs.pop_front() {
53-
if t.nonce() == nonce {
54-
f(t);
52+
while let Some(tx) = self.txs.pop_front() {
53+
if tx.nonce() > nonce {
54+
self.txs.push_front(tx);
5555
break;
5656
}
57-
f(t);
57+
f(tx);
5858
}
5959
self.is_empty()
6060
}

0 commit comments

Comments
 (0)