Skip to content

Commit 5a8a683

Browse files
committed
add stem to leaf graphviz output
1 parent d193f0b commit 5a8a683

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tree.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1604,7 +1604,7 @@ func (n *LeafNode) Value(i int) []byte {
16041604
func (n *LeafNode) toDot(parent, path string) string {
16051605
var hash Fr
16061606
n.Commitment().MapToScalarField(&hash)
1607-
ret := fmt.Sprintf("leaf%s [label=\"L: %x\nC: %x\nC₁: %x\nC₂:%x\"]\n%s -> leaf%s\n", path, hash.Bytes(), n.commitment.Bytes(), n.c1.Bytes(), n.c2.Bytes(), parent, path)
1607+
ret := fmt.Sprintf("leaf%s [label=\"L: %x\nC: %x\nStem: %x\nC₁: %x\nC₂:%x\"]\n%s -> leaf%s\n", path, hash.Bytes(), n.commitment.Bytes(), n.stem, n.c1.Bytes(), n.c2.Bytes(), parent, path)
16081608
for i, v := range n.values {
16091609
if len(v) != 0 {
16101610
ret = fmt.Sprintf("%sval%s%02x [label=\"%x\"]\nleaf%s -> val%s%02x\n", ret, path, i, v, path, path, i)

0 commit comments

Comments
 (0)