mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-09 15:37:56 -05:00
Miscellaneous Packages from Shared Into Proper Folders (#9638)
* slashutil * builds * interop * viz Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
This commit is contained in:
@@ -29,9 +29,9 @@ go_library(
|
||||
"//monitoring/progress:go_default_library",
|
||||
"//monitoring/tracing:go_default_library",
|
||||
"//proto/prysm/v1alpha1:go_default_library",
|
||||
"//proto/prysm/v1alpha1/slashings:go_default_library",
|
||||
"//shared/bytesutil:go_default_library",
|
||||
"//shared/params:go_default_library",
|
||||
"//shared/slashutil:go_default_library",
|
||||
"@com_github_pkg_errors//:go_default_library",
|
||||
"@com_github_prometheus_client_golang//prometheus:go_default_library",
|
||||
"@com_github_prysmaticlabs_eth2_types//:go_default_library",
|
||||
|
||||
@@ -10,8 +10,8 @@ import (
|
||||
types "github.com/prysmaticlabs/eth2-types"
|
||||
"github.com/prysmaticlabs/prysm/monitoring/tracing"
|
||||
ethpb "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1"
|
||||
"github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1/slashings"
|
||||
"github.com/prysmaticlabs/prysm/shared/bytesutil"
|
||||
"github.com/prysmaticlabs/prysm/shared/slashutil"
|
||||
bolt "go.etcd.io/bbolt"
|
||||
"go.opencensus.io/trace"
|
||||
)
|
||||
@@ -156,7 +156,7 @@ func (s *Store) CheckSlashableAttestation(
|
||||
if existingSigningRoot != nil {
|
||||
var existing [32]byte
|
||||
copy(existing[:], existingSigningRoot)
|
||||
if slashutil.SigningRootsDiffer(existing, signingRoot) {
|
||||
if slashings.SigningRootsDiffer(existing, signingRoot) {
|
||||
slashKind = DoubleVote
|
||||
return fmt.Errorf(doubleVoteMessage, att.Data.Target.Epoch, existingSigningRoot)
|
||||
}
|
||||
@@ -216,7 +216,7 @@ func (s *Store) checkSurroundedVote(
|
||||
Target: ðpb.Checkpoint{Epoch: existingTargetEpoch},
|
||||
},
|
||||
}
|
||||
surrounded := slashutil.IsSurround(existingAtt, att)
|
||||
surrounded := slashings.IsSurround(existingAtt, att)
|
||||
if surrounded {
|
||||
return SurroundedVote, fmt.Errorf(
|
||||
surroundedVoteMessage,
|
||||
@@ -256,7 +256,7 @@ func (s *Store) checkSurroundingVote(
|
||||
Target: ðpb.Checkpoint{Epoch: existingTargetEpoch},
|
||||
},
|
||||
}
|
||||
surrounding := slashutil.IsSurround(att, existingAtt)
|
||||
surrounding := slashings.IsSurround(att, existingAtt)
|
||||
if surrounding {
|
||||
return SurroundingVote, fmt.Errorf(
|
||||
surroundingVoteMessage,
|
||||
|
||||
Reference in New Issue
Block a user