From 94664b1b4a549c21fad9a940238975efdd60e8ed Mon Sep 17 00:00:00 2001 From: nabarun Date: Tue, 15 Mar 2022 19:22:09 +0530 Subject: [PATCH] Updated unit tests for changes in builder --- statediff/builder_test.go | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/statediff/builder_test.go b/statediff/builder_test.go index bc5055792..f205daaf1 100644 --- a/statediff/builder_test.go +++ b/statediff/builder_test.go @@ -2082,16 +2082,10 @@ func TestBuilderWithRemovedWatchedAccount(t *testing.T) { NodeValue: contractAccountAtBlock5LeafNode, StorageNodes: []types2.StorageNode{ { - Path: []byte{}, + Path: []byte{'\x0c'}, NodeType: types2.Leaf, - LeafKey: slot0StorageKey.Bytes(), - NodeValue: slot0StorageLeafRootNode, - }, - { - Path: []byte{'\x02'}, - NodeType: types2.Removed, - LeafKey: slot0StorageKey.Bytes(), - NodeValue: []byte{}, + LeafKey: slot3StorageKey.Bytes(), + NodeValue: slot3StorageLeafNode, }, { Path: []byte{'\x04'}, @@ -2128,6 +2122,20 @@ func TestBuilderWithRemovedWatchedAccount(t *testing.T) { NodeType: types2.Removed, LeafKey: contractLeafKey, NodeValue: []byte{}, + StorageNodes: []types2.StorageNode{ + { + Path: []byte{'\x02'}, + NodeType: types2.Removed, + LeafKey: slot0StorageKey.Bytes(), + NodeValue: []byte{}, + }, + { + Path: []byte{'\x0c'}, + NodeType: types2.Removed, + LeafKey: slot3StorageKey.Bytes(), + NodeValue: []byte{}, + }, + }, }, { Path: []byte{'\x0e'},