diff --git a/core/trie/proof_test.go b/core/trie/proof_test.go index ea3266396e..1d900bcdc8 100644 --- a/core/trie/proof_test.go +++ b/core/trie/proof_test.go @@ -586,17 +586,17 @@ func TestBuildTrie(t *testing.T) { require.NoError(t, err) // Assert the structure is correct - require.Equal(t, rootKey, builtRootKey) - compareLeftRight(t, rootNode, builtRootNode) - compareLeftRight(t, leftNode, builtLeftNode) - compareLeftRight(t, rightNode, builtRightNode) - compareLeftRight(t, leftleftNode, builtLeftLeftNode) - compareLeftRight(t, leftrightNode, builtLeftRightNode) + require.Equal(t, rootKey, builtRootKey) // correct + compareLeftRight(t, rootNode, builtRootNode) // correct + compareLeftRight(t, leftNode, builtLeftNode) // correct + compareLeftRight(t, rightNode, builtRightNode) // correct + compareLeftRight(t, leftleftNode, builtLeftLeftNode) // correct + compareLeftRight(t, leftrightNode, builtLeftRightNode) // correct // Assert the leaf nodes have the correct values - require.Equal(t, leftleftNode.Value.String(), builtLeftLeftNode.Value.String(), "should be 0x4") // correct - require.Equal(t, leftrightNode.Value.String(), builtLeftRightNode.Value.String(), "should be 0x5") - require.Equal(t, rightNode.Value.String(), builtRightNode.Value.String(), "should be 0x6") // correct + require.Equal(t, leftleftNode.Value.String(), builtLeftLeftNode.Value.String(), "should be 0x4") // correct + require.Equal(t, leftrightNode.Value.String(), builtLeftRightNode.Value.String(), "should be 0x5") // correct + require.Equal(t, rightNode.Value.String(), builtRightNode.Value.String(), "should be 0x6") // correct // Given the above two asserts pass, we should be able to reconstruct the correct commitment reconstructedRootCommitment, err := builtTrie.Root() // Todo: need to force rehashing all nodes (since all are modified)??