Skip to content

Commit

Permalink
Move comment so it's in the correct place now that lock.retain is moved.
Browse files Browse the repository at this point in the history
  • Loading branch information
max-dfinity committed Jan 2, 2025
1 parent 6297a92 commit 49f1d65
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions rs/nns/governance/src/governance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6987,11 +6987,6 @@ impl Governance {
);
}
Err(error) => {
// Retain the neuron lock, the neuron won't be able to undergo stake changing
// operations until this is fixed.
// This is different from what we do in most places because we usually rely
// on trapping to retain the lock, but we can't do that here since we're not
// working on a single neuron.
println!(
"{}Error spawning neuron: {:?}. Ledger update failed with err: {:?}. \
Reverting state, so another attempt can be made.",
Expand All @@ -7013,6 +7008,11 @@ impl Governance {
neuron_id,
e
);
// Retain the neuron lock, the neuron won't be able to undergo stake changing
// operations until this is fixed.
// This is different from what we do in most places because we usually rely
// on trapping to retain the lock, but we can't do that here since we're not
// working on a single neuron.
lock.retain();
}
};
Expand Down

0 comments on commit 49f1d65

Please sign in to comment.