fix: return serialized root in state root, not its mapping to a scalar field (#289)

This commit is contained in:
Guillaume Ballet 2023-10-12 17:37:02 +02:00
parent 189a4770dd
commit faee2f9587

View file

@ -286,9 +286,7 @@ func (trie *VerkleTrie) Commit(_ bool) (common.Hash, *trienode.NodeSet, error) {
}
batch.Write()
// Serialize root commitment form
rootH := root.Hash().BytesLE()
return common.BytesToHash(rootH[:]), nil, nil
return trie.Hash(), nil, nil
}
// NodeIterator returns an iterator that returns nodes of the trie. Iteration