From d3bc7f3a85e5a6e274bc5604d1c6bf10ada9699c Mon Sep 17 00:00:00 2001 From: "razvan.angheluta" Date: Fri, 17 Jan 2025 14:01:45 +0200 Subject: [PATCH] update history test for a better coverage --- x/merkledb/history_test.go | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/x/merkledb/history_test.go b/x/merkledb/history_test.go index a2130674596f..9f779ced4bbe 100644 --- a/x/merkledb/history_test.go +++ b/x/merkledb/history_test.go @@ -654,17 +654,10 @@ func Test_Change_List(t *testing.T) { endRoot, err = db.GetMerkleRoot(context.Background()) require.NoError(err) - changes, err = db.history.getValueChanges(startRoot, endRoot, maybe.Nothing[[]byte](), maybe.Nothing[[]byte](), 9) + changes, err = db.history.getValueChanges(startRoot, endRoot, maybe.Some[[]byte]([]byte("key22")), maybe.Some[[]byte]([]byte("key30")), 6) require.NoError(err) require.Equal(changes, []*keyChange{ - { - change: &change[maybe.Maybe[[]byte]]{ - before: maybe.Some([]byte("value21")), - after: maybe.Nothing[[]byte](), - }, - key: ToKey([]byte("key21")), - }, { change: &change[maybe.Maybe[[]byte]]{ before: maybe.Some([]byte("value22")), @@ -707,20 +700,6 @@ func Test_Change_List(t *testing.T) { }, key: ToKey([]byte("key28")), }, - { - change: &change[maybe.Maybe[[]byte]]{ - before: maybe.Nothing[[]byte](), - after: maybe.Some([]byte("value29")), - }, - key: ToKey([]byte("key29")), - }, - { - change: &change[maybe.Maybe[[]byte]]{ - before: maybe.Nothing[[]byte](), - after: maybe.Some([]byte("value30")), - }, - key: ToKey([]byte("key30")), - }, }) }