mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-09 15:37:56 -05:00
add log for committee index on electra attesation (#14993)
* adding log in the case of debugging * gaz
This commit is contained in:
3
changelog/james-prysm_committee-index-log.md
Normal file
3
changelog/james-prysm_committee-index-log.md
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
### Added
|
||||||
|
|
||||||
|
- add log to committee index when committeebits are not the expected length of 1
|
||||||
@@ -333,6 +333,7 @@ go_library(
|
|||||||
srcs = [
|
srcs = [
|
||||||
"attestation.go",
|
"attestation.go",
|
||||||
"beacon_block.go",
|
"beacon_block.go",
|
||||||
|
"log.go",
|
||||||
"cloners.go",
|
"cloners.go",
|
||||||
"eip_7521.go",
|
"eip_7521.go",
|
||||||
"sync_committee_mainnet.go",
|
"sync_committee_mainnet.go",
|
||||||
@@ -373,6 +374,8 @@ go_library(
|
|||||||
"@org_golang_google_protobuf//runtime/protoimpl:go_default_library",
|
"@org_golang_google_protobuf//runtime/protoimpl:go_default_library",
|
||||||
"@org_golang_google_protobuf//types/descriptorpb:go_default_library",
|
"@org_golang_google_protobuf//types/descriptorpb:go_default_library",
|
||||||
"@org_golang_google_protobuf//types/known/emptypb: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()
|
indices := a.CommitteeBits.BitIndices()
|
||||||
if len(indices) == 0 {
|
if len(indices) == 0 {
|
||||||
return 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]))
|
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