Skip to content

Commit

Permalink
remove comment
Browse files Browse the repository at this point in the history
  • Loading branch information
zakir-code committed Oct 23, 2024
1 parent c571f13 commit 16bfedd
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions types/mempool/priority_nonce_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -540,10 +540,8 @@ func (s *MempoolTestSuite) TestRandomTxOrderManyTimes() {
// validateOrder checks that the txs are ordered by priority and nonce
// in O(n^2) time by checking each tx against all the other txs
func validateOrder(mtxs []sdk.Tx) error {
iterations := 0
var itxs []txSpec
for i, mtx := range mtxs {
iterations++
tx := mtx.(testTx)
itxs = append(itxs, txSpec{p: int(tx.priority), n: int(tx.nonce), a: tx.address, i: i})
}
Expand All @@ -556,7 +554,6 @@ func validateOrder(mtxs []sdk.Tx) error {

for _, a := range itxs {
for _, b := range itxs {
iterations++
// when b is before a

// when a is before b
Expand All @@ -574,7 +571,6 @@ func validateOrder(mtxs []sdk.Tx) error {
// find a tx with same sender as b and lower nonce
found := false
for _, c := range itxs {
iterations++
if c.a.Equals(b.a) && c.n < b.n && c.p <= a.p {
found = true
break
Expand All @@ -588,8 +584,6 @@ func validateOrder(mtxs []sdk.Tx) error {
}
}
}
_ = iterations
// fmt.Printf("validation in iterations: %d\n", iterations)
return nil
}

Expand Down

0 comments on commit 16bfedd

Please sign in to comment.