We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 12df230 commit 759903fCopy full SHA for 759903f
common/db/table/table_test.go
@@ -470,6 +470,7 @@ func TestTableListPrimary(t *testing.T) {
470
assert.Nil(t, err)
471
//save to database
472
util.SaveKVList(ldb, kvs)
473
+ // get smaller key
474
hash := tx1.Hash()
475
if bytes.Compare(hash, tx2.Hash()) > 0 {
476
hash = tx2.Hash()
@@ -507,13 +508,6 @@ func TestTableListPrimary(t *testing.T) {
507
508
assert.Equal(t, 1, len(rows))
509
assert.Equal(t, tx1.Hash(), rows[0].Primary)
510
- // List with primary
511
- rows, _ = table.ListIndex("From", nil, hash, 10, db.ListASC)
512
- assert.Equal(t, 1, len(rows))
513
- assert.NotEqual(t, hash, rows[0].Primary)
514
- _, err = table.ListIndex("From", nil, hash, 10, db.ListDESC)
515
- assert.Equal(t, types.ErrNotFound, err)
516
-
517
// List with primary and prefix
518
_, err = table.ListIndex("From", []byte(addr1)[:20], tx1.Hash(), 10, db.ListASC)
519
assert.Equal(t, types.ErrNotFound, err)
0 commit comments