Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Polkadot v0.9.43: Loan and investment benchmarks fixed #1602

Merged
merged 1 commit into from
Oct 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion libs/mocks/src/data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ pub mod pallet {
}

pub fn mock_feed_value(
f: impl Fn(T::AccountId, T::DataId, T::DataElem) -> DispatchResult + 'static,
f: impl Fn(Option<T::AccountId>, T::DataId, T::DataElem) -> DispatchResult + 'static,
) {
register_call!(move |(a, b, c)| f(a, b, c));
}
Expand Down
2 changes: 1 addition & 1 deletion libs/test-utils/src/mocks/accountant.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ macro_rules! impl_mock_accountant {
) -> Result<(), Self::Error> {
let _ = __private_STATE.with(|s| s.borrow().info(&id))?;

Tokens::transfer(id.into(), source, dest, amount, Preservation::Protect)
Tokens::transfer(id.into(), source, dest, amount, Preservation::Expendable)
.map(|_| ())
}

Expand Down
2 changes: 1 addition & 1 deletion pallets/block-rewards/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use sp_runtime::traits::BadOrigin;
use super::*;
use crate::mock::*;

const REWARD: u128 = 100 * crate::mock::ExistentialDeposit::get();
const REWARD: u128 = 100 + crate::mock::ExistentialDeposit::get();
Copy link
Contributor Author

@lemunozm lemunozm Oct 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here's the change in case a positive output from #1577 (comment)


#[test]
fn check_special_privileges() {
Expand Down
6 changes: 3 additions & 3 deletions pallets/loans/src/benchmarking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ where
}

fn propose_policy(pool_id: T::PoolId) -> T::Hash {
let pool_admin = account::<T::AccountId>("pool_admin", 0, 0);
let pool_admin = account("pool_admin", 0, 0);
let policy = Pallet::<T>::worst_case_policy();
Pallet::<T>::propose_write_off_policy(
RawOrigin::Signed(pool_admin).into(),
Expand All @@ -249,7 +249,7 @@ where
fn set_policy(pool_id: T::PoolId) {
let change_id = Self::propose_policy(pool_id);

let any = account::<T::AccountId>("any", 0, 0);
let any = account("any", 0, 0);
Pallet::<T>::apply_write_off_policy(RawOrigin::Signed(any).into(), pool_id, change_id)
.unwrap();
}
Expand All @@ -276,7 +276,7 @@ where
// This restriction no longer exists once
// https://github.com/open-web3-stack/open-runtime-module-library/pull/920 is merged
let feeder = account("feeder", i, 0);
T::PriceRegistry::feed_value(feeder, price_id, Default::default()).unwrap();
T::PriceRegistry::feed_value(Some(feeder), price_id, Default::default()).unwrap();
T::PriceRegistry::register_id(&price_id, &pool_id).unwrap();
}

Expand Down
Loading