mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-19 19:30:44 +00:00
fix linter
This commit is contained in:
parent
1ffd8a1bcb
commit
9c1bb17859
3 changed files with 10 additions and 25 deletions
|
|
@ -332,21 +332,6 @@ func compareTreesWithResolver(t *testing.T, original, deserialized BinaryNode, r
|
|||
return nil
|
||||
}
|
||||
|
||||
func buildDeepTree(depth, maxDepth int) BinaryNode {
|
||||
if depth == maxDepth {
|
||||
// Create a unique hash for this leaf position
|
||||
var h common.Hash
|
||||
h[0] = byte(depth)
|
||||
h[1] = byte(depth >> 8)
|
||||
return HashedNode(h)
|
||||
}
|
||||
return &InternalNode{
|
||||
depth: depth,
|
||||
left: buildDeepTree(depth+1, maxDepth),
|
||||
right: buildDeepTree(depth+1, maxDepth),
|
||||
}
|
||||
}
|
||||
|
||||
// buildDeepTreeUnique builds a tree where each leaf has a unique hash based on its position
|
||||
func buildDeepTreeUnique(depth, maxDepth, position int) BinaryNode {
|
||||
if depth == maxDepth {
|
||||
|
|
|
|||
Loading…
Reference in a new issue