Skip to content

Commit

Permalink
Merge branch 'master' into chains/mainnet-beta
Browse files Browse the repository at this point in the history
  • Loading branch information
olegfomenko committed Apr 30, 2024
2 parents 5ab0e1c + 5c6359d commit e9e58b9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ require (
github.com/pkg/errors v0.9.1
github.com/rakyll/statik v0.1.7
github.com/rarimo/go-merkle v0.0.0-20231004122345-36fa49031c66
github.com/rarimo/ldif-sdk v0.4.3-0.20240418104626-798f3cb9706d
github.com/rarimo/ldif-sdk v0.4.5-rc.3
github.com/rs/cors v1.10.1
github.com/spf13/cast v1.6.0
github.com/spf13/cobra v1.8.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1414,8 +1414,8 @@ github.com/rarimo/cosmos-sdk v0.46.7 h1:jU2PiWzc+19SF02cXM0O0puKPeH1C6Q6t2lzJ9s1
github.com/rarimo/cosmos-sdk v0.46.7/go.mod h1:fqKqz39U5IlEFb4nbQ72951myztsDzFKKDtffYJ63nk=
github.com/rarimo/go-merkle v0.0.0-20231004122345-36fa49031c66 h1:1KAU4rfWWJwAJ/kencagL3k5BXN3HhP004QNkEUgvDE=
github.com/rarimo/go-merkle v0.0.0-20231004122345-36fa49031c66/go.mod h1:5Pt9Lk8w7fWhyRO/NMb5x8DRhF2lESRVPT5uOlezInQ=
github.com/rarimo/ldif-sdk v0.4.3-0.20240418104626-798f3cb9706d h1:/WbhRQ86BNR9tVe3PwUB+cSVaDh/YXnmwqqDZJxY2jo=
github.com/rarimo/ldif-sdk v0.4.3-0.20240418104626-798f3cb9706d/go.mod h1:ONLsbueY7tnVHEt/v4jL1f0j0U4/jCfgxFyXI9k8yDo=
github.com/rarimo/ldif-sdk v0.4.5-rc.3 h1:KlS3PBmCG4uWM8jb8qhbw1jovtuJ6hyTY0oRftJYvwA=
github.com/rarimo/ldif-sdk v0.4.5-rc.3/go.mod h1:ONLsbueY7tnVHEt/v4jL1f0j0U4/jCfgxFyXI9k8yDo=
github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM=
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
Expand Down
9 changes: 5 additions & 4 deletions x/cscalist/client/cli/ldif.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ automatically, see ldif-tree-diff)`,
if err != nil {
return fmt.Errorf("build tree: %w", err)
}
if _, err = fmt.Fprintln(dst, tree.Root()); err != nil {
if _, err = fmt.Fprintln(dst, hexutil.Encode(tree.Root())); err != nil {
return fmt.Errorf("write to destination: %w", err)
}

Expand Down Expand Up @@ -156,12 +156,13 @@ Use cases:
return fmt.Errorf("get root node: %w", err)
}

if tree.Root() != root.Hash {
fmt.Printf("Trees differ: built_root=%s stored_root=%s\n", tree.Root(), root.Hash)
treeRoot := hexutil.Encode(tree.Root())
if treeRoot != root.Hash {
fmt.Printf("Trees differ: built_root=%s stored_root=%s\n", treeRoot, root.Hash)
return nil
}

fmt.Printf("Tree are same: root=%s", tree.Root())
fmt.Printf("Tree are same: root=%s\n", treeRoot)
return nil
},
}
Expand Down

0 comments on commit e9e58b9

Please sign in to comment.