From b2afbf2c83b88afa4e297a5c2c7a1dc2dfab1ee7 Mon Sep 17 00:00:00 2001 From: Eric Woolsey Date: Wed, 23 Aug 2023 16:19:52 -0700 Subject: [PATCH] derive clone --- src/app.rs | 2 ++ src/staking.rs | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/app.rs b/src/app.rs index 54f6a717..1a4cc5d2 100644 --- a/src/app.rs +++ b/src/app.rs @@ -43,6 +43,7 @@ pub type BasicApp = App< /// Router is a persisted state. You can query this. /// Execution generally happens on the RouterCache, which then can be atomically committed or rolled back. /// We offer .execute() as a wrapper around cache, execute, commit/rollback process. +#[derive(Clone)] pub struct App< Bank = BankKeeper, Api = MockApi, @@ -821,6 +822,7 @@ where } } +#[derive(Clone)] pub struct Router { // this can remain crate-only as all special functions are wired up to app currently // we need to figure out another format for wasm, as some like sudo need to be called after init diff --git a/src/staking.rs b/src/staking.rs index 564de3af..53a68b1d 100644 --- a/src/staking.rs +++ b/src/staking.rs @@ -492,7 +492,7 @@ impl StakeKeeper { unbonding_queue .iter_mut() .filter(|ub| &ub.validator == validator) - .for_each(|mut ub| { + .for_each(|ub| { ub.amount = ub.amount * remaining_percentage; }); UNBONDING_QUEUE.save(staking_storage, &unbonding_queue)?;