mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-07 22:54:17 -05:00
add log for committee index on electra attesation (#14993)
* adding log in the case of debugging * gaz
This commit is contained in:
@@ -333,6 +333,7 @@ go_library(
|
||||
srcs = [
|
||||
"attestation.go",
|
||||
"beacon_block.go",
|
||||
"log.go",
|
||||
"cloners.go",
|
||||
"eip_7521.go",
|
||||
"sync_committee_mainnet.go",
|
||||
@@ -373,6 +374,8 @@ go_library(
|
||||
"@org_golang_google_protobuf//runtime/protoimpl:go_default_library",
|
||||
"@org_golang_google_protobuf//types/descriptorpb:go_default_library",
|
||||
"@org_golang_google_protobuf//types/known/emptypb:go_default_library",
|
||||
"@com_github_sirupsen_logrus//:go_default_library",
|
||||
"@com_github_sirupsen_logrus//hooks/test:go_default_library",
|
||||
],
|
||||
)
|
||||
|
||||
|
||||
@@ -291,6 +291,8 @@ func (a *AttestationElectra) GetCommitteeIndex() primitives.CommitteeIndex {
|
||||
indices := a.CommitteeBits.BitIndices()
|
||||
if len(indices) == 0 {
|
||||
return 0
|
||||
} else if len(indices) != 1 {
|
||||
log.WithField("indices", a.CommitteeBits).Debugf("expected 1 committee bit indice got %d", len(indices))
|
||||
}
|
||||
return primitives.CommitteeIndex(uint64(indices[0]))
|
||||
}
|
||||
|
||||
6
proto/prysm/v1alpha1/log.go
Normal file
6
proto/prysm/v1alpha1/log.go
Normal file
@@ -0,0 +1,6 @@
|
||||
package eth
|
||||
|
||||
import "github.com/sirupsen/logrus"
|
||||
|
||||
var logger = logrus.StandardLogger()
|
||||
var log = logger.WithField("prefix", "protobuf")
|
||||
Reference in New Issue
Block a user