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:
Raul Jordan
2021-09-17 16:55:24 -05:00
committed by GitHub
parent d2f74615ab
commit 7dadc780b8
140 changed files with 470 additions and 470 deletions

View File

@@ -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",
],
)

View File

@@ -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]...))