Skip to content

Commit 407d32b

Browse files
committed
https://github.com/pendulum-chain/spacewalk/pull/350#discussion_r1206408348,
#350 (comment), #350 (comment)
1 parent 56845b5 commit 407d32b

File tree

4 files changed

+17
-12
lines changed

4 files changed

+17
-12
lines changed

pallets/issue/src/benchmarking.rs

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,7 @@ benchmarks! {
6464
request_issue {
6565
let origin: T::AccountId = account("Origin", 0, 0);
6666
let vault_id = get_vault_id::<T>();
67-
// this amount is when running the benchmark with the testchain
68-
// let amount = 1000_0000u32.into();
69-
let amount = 1000u32.into();
67+
let amount = 10_000_000u32.into();
7068
let asset = vault_id.wrapped_currency();
7169
let relayer_id: T::AccountId = account("Relayer", 0, 0);
7270

@@ -187,6 +185,19 @@ benchmarks! {
187185

188186
impl_benchmark_test_suite!(
189187
Issue,
190-
crate::mock::ExtBuilder::build_with(Default::default()),
188+
crate::mock::ExtBuilder::build_with(orml_tokens::GenesisConfig::<crate::mock::Test> {
189+
balances: vec![
190+
currency::testing_constants::DEFAULT_COLLATERAL_CURRENCY,
191+
currency::testing_constants::DEFAULT_NATIVE_CURRENCY
192+
]
193+
.into_iter()
194+
.flat_map(|currency_id| {
195+
vec![
196+
(crate::mock::USER, currency_id, 1_000_000_000_000),
197+
(crate::mock::VAULT.account_id, currency_id, 1_000_000_000_000),
198+
]
199+
})
200+
.collect(),
201+
}),
191202
crate::mock::Test
192203
);

pallets/issue/src/mock.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ impl ExtBuilder {
376376

377377
fee::GenesisConfig::<Test> {
378378
issue_fee: UnsignedFixedPoint::checked_from_rational(5, 1000).unwrap(), // 0.5%
379-
issue_griefing_collateral: UnsignedFixedPoint::checked_from_rational(5, 100000)
379+
issue_griefing_collateral: UnsignedFixedPoint::checked_from_rational(5, 1_000_000_000)
380380
.unwrap(), // 0.005%
381381
redeem_fee: UnsignedFixedPoint::checked_from_rational(5, 1000).unwrap(), // 0.5%
382382
premium_redeem_fee: UnsignedFixedPoint::checked_from_rational(5, 100).unwrap(), // 5%

testchain/node/src/chain_spec.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ fn testnet_genesis(
451451
AssetId::new(b"FIAT".to_vec(), b"MXN-USD".to_vec()),
452452
AssetId::new(b"Stellar".to_vec(), b"XLM".to_vec()),
453453
],
454-
batching_api: b"http://dia-00.pendulumchain.tech:8070/currencies".to_vec(),
454+
batching_api: b"https://dia-00.pendulumchain.tech:8070/currencies".to_vec(),
455455
coin_infos_map: vec![],
456456
},
457457
}

testchain/runtime/src/lib.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -176,12 +176,6 @@ impl pallet_aura::Config for Runtime {
176176

177177
impl pallet_grandpa::Config for Runtime {
178178
type RuntimeEvent = RuntimeEvent;
179-
// type KeyOwnerProof =
180-
// <Self::KeyOwnerProofSystem as KeyOwnerProofSystem<(KeyTypeId, GrandpaId)>>::Proof;
181-
// type KeyOwnerIdentification = <Self::KeyOwnerProofSystem as KeyOwnerProofSystem<(
182-
// KeyTypeId,
183-
// GrandpaId,
184-
// )>>::IdentificationTuple;
185179
type KeyOwnerProof = sp_core::Void;
186180
type WeightInfo = ();
187181
type MaxAuthorities = MaxAuthorities;

0 commit comments

Comments
 (0)