mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-09 15:37:56 -05:00
Move Shared Packages into Math/ and IO/ (#9622)
* amend * building * build * userprompt * imports * build val * gaz * io file Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
This commit is contained in:
@@ -10,9 +10,9 @@ go_library(
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
"//crypto/hash:go_default_library",
|
||||
"//math:go_default_library",
|
||||
"//proto/prysm/v1alpha1:go_default_library",
|
||||
"//shared/bytesutil:go_default_library",
|
||||
"//shared/mathutil:go_default_library",
|
||||
],
|
||||
)
|
||||
|
||||
|
||||
@@ -8,9 +8,9 @@ import (
|
||||
"fmt"
|
||||
|
||||
"github.com/prysmaticlabs/prysm/crypto/hash"
|
||||
"github.com/prysmaticlabs/prysm/math"
|
||||
protodb "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1"
|
||||
"github.com/prysmaticlabs/prysm/shared/bytesutil"
|
||||
"github.com/prysmaticlabs/prysm/shared/mathutil"
|
||||
)
|
||||
|
||||
// SparseMerkleTrie implements a sparse, general purpose Merkle trie to be used
|
||||
@@ -180,7 +180,7 @@ func VerifyMerkleBranch(root, item []byte, merkleIndex int, proof [][]byte, dept
|
||||
}
|
||||
node := bytesutil.ToBytes32(item)
|
||||
for i := 0; i <= int(depth); i++ {
|
||||
if (uint64(merkleIndex) / mathutil.PowerOf2(uint64(i)) % 2) != 0 {
|
||||
if (uint64(merkleIndex) / math.PowerOf2(uint64(i)) % 2) != 0 {
|
||||
node = hash.Hash(append(proof[i], node[:]...))
|
||||
} else {
|
||||
node = hash.Hash(append(node[:], proof[i]...))
|
||||
|
||||
Reference in New Issue
Block a user