mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-08 21:08:10 -05:00
Remove Unused assignment (#14906)
* Remove unused boolean assignment * Changelog * Remove debug line
This commit is contained in:
@@ -53,7 +53,6 @@ func (b *BeaconState) SetPendingConsolidations(val []*ethpb.PendingConsolidation
|
||||
b.pendingConsolidations = val
|
||||
|
||||
b.markFieldAsDirty(types.PendingConsolidations)
|
||||
b.rebuildTrie[types.PendingConsolidations] = true
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -53,7 +53,6 @@ func (b *BeaconState) SetPendingDeposits(val []*ethpb.PendingDeposit) error {
|
||||
b.pendingDeposits = val
|
||||
|
||||
b.markFieldAsDirty(types.PendingDeposits)
|
||||
b.rebuildTrie[types.PendingDeposits] = true
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -22,7 +22,6 @@ func (b *BeaconState) SetPreviousParticipationBits(val []byte) error {
|
||||
|
||||
b.previousEpochParticipation = val
|
||||
b.markFieldAsDirty(types.PreviousEpochParticipationBits)
|
||||
b.rebuildTrie[types.PreviousEpochParticipationBits] = true
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -41,7 +40,6 @@ func (b *BeaconState) SetCurrentParticipationBits(val []byte) error {
|
||||
|
||||
b.currentEpochParticipation = val
|
||||
b.markFieldAsDirty(types.CurrentEpochParticipationBits)
|
||||
b.rebuildTrie[types.CurrentEpochParticipationBits] = true
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -126,7 +124,6 @@ func (b *BeaconState) ModifyPreviousParticipationBits(mutator func(val []byte) (
|
||||
defer b.lock.Unlock()
|
||||
b.previousEpochParticipation = participation
|
||||
b.markFieldAsDirty(types.PreviousEpochParticipationBits)
|
||||
b.rebuildTrie[types.PreviousEpochParticipationBits] = true
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -161,6 +158,5 @@ func (b *BeaconState) ModifyCurrentParticipationBits(mutator func(val []byte) ([
|
||||
defer b.lock.Unlock()
|
||||
b.currentEpochParticipation = participation
|
||||
b.markFieldAsDirty(types.CurrentEpochParticipationBits)
|
||||
b.rebuildTrie[types.CurrentEpochParticipationBits] = true
|
||||
return nil
|
||||
}
|
||||
|
||||
3
changelog/nisdas_remove_useless_assignment.md
Normal file
3
changelog/nisdas_remove_useless_assignment.md
Normal file
@@ -0,0 +1,3 @@
|
||||
### Fixed
|
||||
|
||||
- We remove the unused `rebuildTrie` assignments for fields which do not use them.
|
||||
Reference in New Issue
Block a user