Skip to content

Commit

Permalink
fix: commit inside hashTreeRoot()
Browse files Browse the repository at this point in the history
  • Loading branch information
twoeths committed Jun 26, 2024
1 parent 30c252c commit e0857e1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/ssz/src/viewDU/abstract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ export abstract class TreeViewDU<T extends CompositeType<unknown, unknown, unkno
* https://github.com/ethereum/consensus-specs/blob/dev/ssz/simple-serialize.md#merkleization
*/
hashTreeRoot(): Uint8Array {
this.commit();
return this.node.root;
}

Expand Down

0 comments on commit e0857e1

Please sign in to comment.