Skip to content

Commit c599b78

Browse files
committed
core/types: fix test for TransactionsByPriceAndNonce
1 parent cefeb58 commit c599b78

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

core/types/transaction_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -147,12 +147,12 @@ func TestTransactionPriceNonceSort(t *testing.T) {
147147
txset := NewTransactionsByPriceAndNonce(signer, groups)
148148

149149
txs := Transactions{}
150-
for {
151-
if tx := txset.Peek(); tx != nil {
152-
txs = append(txs, tx)
153-
txset.Shift()
154-
}
155-
break
150+
for tx := txset.Peek(); tx != nil; tx = txset.Peek() {
151+
txs = append(txs, tx)
152+
txset.Shift()
153+
}
154+
if len(txs) != 25*25 {
155+
t.Errorf("expected %d transactions, found %d", 25*25, len(txs))
156156
}
157157
for i, txi := range txs {
158158
fromi, _ := Sender(signer, txi)

0 commit comments

Comments
 (0)