aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2017-10-13 15:51:22 +0800
committerGitHub <noreply@github.com>2017-10-13 15:51:22 +0800
commit0ed4d76c7983f7f9aa54cd97268b71c890403a8a (patch)
treee1fbf8fa5b4cc574077ede664c03129075e618ed
parent4b5e79728862da8ee7598e8d0f128b2d1543e245 (diff)
parentc599b78f62cda1ab91117b966f88f79fe4778f4f (diff)
downloaddexon-0ed4d76c7983f7f9aa54cd97268b71c890403a8a.tar.gz
dexon-0ed4d76c7983f7f9aa54cd97268b71c890403a8a.tar.zst
dexon-0ed4d76c7983f7f9aa54cd97268b71c890403a8a.zip
Merge pull request #15275 from mcdee/master
core/types: fix test for TransactionsByPriceAndNonce
-rw-r--r--core/types/transaction_test.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/core/types/transaction_test.go b/core/types/transaction_test.go
index 30ecb84dd..82d74e3b3 100644
--- a/core/types/transaction_test.go
+++ b/core/types/transaction_test.go
@@ -147,12 +147,12 @@ func TestTransactionPriceNonceSort(t *testing.T) {
txset := NewTransactionsByPriceAndNonce(signer, groups)
txs := Transactions{}
- for {
- if tx := txset.Peek(); tx != nil {
- txs = append(txs, tx)
- txset.Shift()
- }
- break
+ for tx := txset.Peek(); tx != nil; tx = txset.Peek() {
+ txs = append(txs, tx)
+ txset.Shift()
+ }
+ if len(txs) != 25*25 {
+ t.Errorf("expected %d transactions, found %d", 25*25, len(txs))
}
for i, txi := range txs {
fromi, _ := Sender(signer, txi)