Skip to content

Commit

Permalink
Use hashTreeRoot()
Browse files Browse the repository at this point in the history
  • Loading branch information
dapplion committed Aug 30, 2021
1 parent f551f42 commit 3660440
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ export function stateTransition(

// Verify state root
if (verifyStateRoot) {
if (!ssz.Root.equals(block.stateRoot, postState.tree.root)) {
if (!ssz.Root.equals(block.stateRoot, postState.hashTreeRoot())) {
throw new Error(
`Invalid state root at slot ${block.slot}, expected=${toHexString(block.stateRoot)}, actual=${toHexString(
postState.tree.root
postState.hashTreeRoot()
)}`
);
}
Expand Down

0 comments on commit 3660440

Please sign in to comment.