diff options
author | Jim McDonald <Jim@mcdee.net> | 2017-10-11 18:35:44 +0800 |
---|---|---|
committer | Jim McDonald <Jim@mcdee.net> | 2017-10-11 18:35:44 +0800 |
commit | c599b78f62cda1ab91117b966f88f79fe4778f4f (patch) | |
tree | 8b1653bc1dd2e29a0e14d4281d57d0dd7d1644f6 /core | |
parent | cefeb5859866f2fe119b7936f7c97137b7efb7b6 (diff) | |
download | dexon-c599b78f62cda1ab91117b966f88f79fe4778f4f.tar dexon-c599b78f62cda1ab91117b966f88f79fe4778f4f.tar.gz dexon-c599b78f62cda1ab91117b966f88f79fe4778f4f.tar.bz2 dexon-c599b78f62cda1ab91117b966f88f79fe4778f4f.tar.lz dexon-c599b78f62cda1ab91117b966f88f79fe4778f4f.tar.xz dexon-c599b78f62cda1ab91117b966f88f79fe4778f4f.tar.zst dexon-c599b78f62cda1ab91117b966f88f79fe4778f4f.zip |
core/types: fix test for TransactionsByPriceAndNonce
Diffstat (limited to 'core')
-rw-r--r-- | core/types/transaction_test.go | 12 |
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) |