Skip to content

Commit

Permalink
fix warnings, fix e2e test
Browse files Browse the repository at this point in the history
fix capacity import in api-augment
remove unused constant
use ProviderBoostHistoryLimit value set in parameter_types
bump spec_version
  • Loading branch information
shannonwells committed Oct 29, 2024
1 parent 82324cb commit 5af0a4f
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 26 deletions.
22 changes: 11 additions & 11 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion e2e/capacity/list_unclaimed_rewards.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ describe('Capacity: list_unclaimed_rewards', function () {
if (isTestnet()) this.skip();

const [_provider, booster] = await setUpForBoosting('booster2', 'provider2');
console.debug(`Booster pubkey: ${booster.address}`);

// Move out of the era we boosted inside of
await ExtrinsicHelper.runToBlock(await getNextRewardEraBlock());
Expand Down
2 changes: 1 addition & 1 deletion js/api-augment/definitions/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ export { default as statefulStorage } from './statefulStorage.js';
export { default as handles } from './handles.js';
export { default as frequency } from './frequency.js';
export { default as frequencyTxPayment } from './frequencyTxPayment.js';
export { default as capacity } from './capacity';
export { default as capacity } from './capacity.js';
2 changes: 0 additions & 2 deletions runtime/common/src/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,4 @@ parameter_types! {
pub type CapacityRewardEraLength =
ConstU32<{ prod_or_testnet_or_local!(14 * DAYS, 1 * HOURS, 50) }>;

pub type CapacityChangeStakingTargetThawEras = ConstU32<5>;

// -end- Capacity Pallet ---
16 changes: 5 additions & 11 deletions runtime/frequency/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,20 +92,14 @@ pub use pallet_time_release;
// Polkadot Imports
use polkadot_runtime_common::{BlockHashCount, SlowAdjustingFeeUpdate};

use common_runtime::weights::rocksdb_weights::constants::RocksDbWeight;
pub use common_runtime::{
constants::MaxSchemaGrants,
weights,
weights::{block_weights::BlockExecutionWeight, extrinsic_weights::ExtrinsicBaseWeight},
};
use frame_support::traits::Contains;

use common_primitives::{
msa::MessageSourceId,
schema::SchemaId,
stateful_storage::{PageHash, PageId},
};
use common_runtime::weights::rocksdb_weights::constants::RocksDbWeight;

mod genesis;

/// Interface to collective pallet to propose a proposal.
Expand Down Expand Up @@ -394,7 +388,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("frequency"),
impl_name: create_runtime_str!("frequency"),
authoring_version: 1,
spec_version: 123,
spec_version: 130,
impl_version: 0,
apis: apis::RUNTIME_API_VERSIONS,
transaction_version: 1,
Expand All @@ -408,7 +402,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("frequency-testnet"),
impl_name: create_runtime_str!("frequency"),
authoring_version: 1,
spec_version: 123,
spec_version: 130,
impl_version: 0,
apis: apis::RUNTIME_API_VERSIONS,
transaction_version: 1,
Expand Down Expand Up @@ -571,8 +565,8 @@ impl pallet_capacity::Config for Runtime {
type EpochNumber = u32;
type CapacityPerToken = CapacityPerToken;
type RuntimeFreezeReason = RuntimeFreezeReason;
type EraLength = ConstU32<{ 14 * DAYS }>;
type ProviderBoostHistoryLimit = ConstU32<30u32>;
type EraLength = CapacityRewardEraLength;
type ProviderBoostHistoryLimit = ProviderBoostHistoryLimit;
type RewardsProvider = Capacity;
type MaxRetargetsPerRewardEra = ConstU32<2>;
// Value determined by desired inflation rate limits for chosen economic model
Expand Down

0 comments on commit 5af0a4f

Please sign in to comment.