Skip to content

Commit

Permalink
linera-service: refresh PRNG seed more to align with tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Twey committed Jul 1, 2024
1 parent 35e06bd commit 28df385
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions linera-service/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,7 @@ impl Persistent for WalletState {
type Error = anyhow::Error;

fn save(this: &mut Self) -> anyhow::Result<()> {
Persistent::as_mut(&mut this.wallet).refresh_prng_seed(&mut this.prng);
Persistent::save(&mut this.wallet)?;
Persistent::mutate(&mut this.wallet).refresh_prng_seed(&mut this.prng);
tracing::debug!("Persisted user chains");
Ok(())
}
Expand All @@ -97,7 +96,7 @@ impl Persistent for WalletState {

impl Extend<UserChain> for WalletState {
fn extend<Chains: IntoIterator<Item = UserChain>>(&mut self, chains: Chains) {
Persistent::mutate(&mut self.wallet).extend(chains);
Persistent::mutate(self).extend(chains);
}
}

Expand Down

0 comments on commit 28df385

Please sign in to comment.