Skip to content

Commit dc4517b

Browse files
committed
Remove unnecessary mutable borrow
1 parent c36e741 commit dc4517b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

core/src/consensus/tendermint/engine.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ impl ConsensusEngine for Tendermint {
173173
self.machine.add_balance(block, &author, block_author_reward)?;
174174
}
175175
_ => {
176-
stake::update_validator_weights(&mut block.state_mut(), &author)?;
176+
stake::update_validator_weights(block.state_mut(), &author)?;
177177
stake::add_intermediate_rewards(block.state_mut(), author, block_author_reward)?;
178178
}
179179
}
@@ -185,7 +185,7 @@ impl ConsensusEngine for Tendermint {
185185
let inactive_validators = match term {
186186
0 => Vec::new(),
187187
_ => {
188-
let rewards = stake::drain_previous_rewards(&mut block.state_mut())?;
188+
let rewards = stake::drain_previous_rewards(block.state_mut())?;
189189
let start_of_the_current_term = metadata.last_term_finished_block_num() + 1;
190190
let client = self
191191
.client
@@ -226,7 +226,7 @@ impl ConsensusEngine for Tendermint {
226226
}
227227
}
228228

229-
stake::move_current_to_previous_intermediate_rewards(&mut block.state_mut())?;
229+
stake::move_current_to_previous_intermediate_rewards(block.state_mut())?;
230230

231231
let validators = stake::Validators::load_from_state(block.state())?
232232
.into_iter()

0 commit comments

Comments
 (0)