We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 69908ff commit 91d2afbCopy full SHA for 91d2afb
merkletree/tree.go
@@ -77,7 +77,7 @@ func newBareTree(leafs uint64) *TreeData {
77
// Then decoding the tree, bottom-up, starting with the leafs as the amount of nodes in one level defines the amount of nodes in its parent level
78
// NOTE that correctness of the tree is NOT validated as part of this method
79
func DeserializeTree(tree []byte) (*TreeData, error) {
80
- if tree == nil || len(tree) < BytesInInt {
+ if len(tree) < BytesInInt {
81
return nil, xerrors.New("no tree encoded")
82
}
83
lvlSize := binary.LittleEndian.Uint64(tree[:BytesInInt])
0 commit comments