Skip to content

Commit

Permalink
Add entry to changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
max-dfinity committed Mar 4, 2025
1 parent b7e3729 commit dc4554e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 4 additions & 4 deletions rs/nns/governance/src/reward/distribution.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ impl<Memory: ic_stable_structures::Memory> RewardsDistributionStateMachine<Memor
let mut distribution = self
.distributions
.remove(&day_after_genesis)
.map(|proto| RewardsDistribution::from(proto))
.unwrap_or(RewardsDistribution::new());
.map(RewardsDistribution::from)
.unwrap_or_default();

let result = callback(&mut distribution);

Expand Down Expand Up @@ -310,7 +310,7 @@ mod test {
rewards_distribution_state_machine.with_distribution_for_event(
day_after_genesis,
|distribution| {
for (id, _neuron) in &neurons {
for id in neurons.keys() {
distribution.add_reward(NeuronId { id: *id }, 10);
}
},
Expand Down Expand Up @@ -368,7 +368,7 @@ mod test {
RewardsDistributionStateMachine::new(DefaultMemoryImpl::default());

rewards_distribution_state_machine.with_distribution_for_event(1, |distribution| {
for (id, _neuron) in &neurons {
for id in neurons.keys() {
distribution.add_reward(NeuronId { id: *id }, 10);
}
});
Expand Down
2 changes: 2 additions & 0 deletions rs/nns/governance/unreleased_changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ on the process that this file is part of, see
* Voting Rewards will be scheduled by a timer instead of by heartbeats.
* Unstaking maturity task will be processing up to 100 neurons in a single message, to avoid
exceeding the instruction limit in a single execution.
* Voting Rewards will be distributed asynchronously in the background after being calculated.
* This will allow rewards to be compatible with neurons being stored in Stable Memory.

## Deprecated

Expand Down

0 comments on commit dc4554e

Please sign in to comment.