Compare commits

...

1 Commits

Author SHA1 Message Date
satushh
5933a1f876 copy data once to be safe 2025-12-10 04:27:30 +00:00
2 changed files with 5 additions and 1 deletions

View File

@@ -58,9 +58,10 @@ func AreEth1DataEqual(a, b *ethpb.Eth1Data) bool {
// votes to see if they match the eth1data.
func Eth1DataHasEnoughSupport(beaconState state.ReadOnlyBeaconState, data *ethpb.Eth1Data) (bool, error) {
voteCount := uint64(0)
dataCopy := data.Copy()
for _, vote := range beaconState.Eth1DataVotes() {
if AreEth1DataEqual(vote, data) {
if AreEth1DataEqual(vote, dataCopy) {
voteCount++
}
}

View File

@@ -0,0 +1,3 @@
### Changed
- In Eth1DataHasEnoughSupport do copy once to be sure of safety