Skip to content

Commit

Permalink
fix processor/mock
Browse files Browse the repository at this point in the history
  • Loading branch information
cuteolaf committed Aug 8, 2024
1 parent de5c060 commit 6c7709a
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions pallets/processor/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,18 @@ parameter_types! {
pub const RegionsUnsignedPriority: TransactionPriority = TransactionPriority::max_value();
}

parameter_types! {
pub static RelayBlockNumber: u64 = 0;
}

pub struct RelayBlockNumberProvider;
impl BlockNumberProvider for RelayBlockNumberProvider {
type BlockNumber = u64;
fn current_block_number() -> Self::BlockNumber {
RelayBlockNumber::get()
}
}

impl pallet_regions::Config for Test {
type RuntimeEvent = RuntimeEvent;
type Currency = Balances;
Expand All @@ -175,6 +187,8 @@ impl pallet_regions::Config for Test {
type StateMachineHeightProvider = MockStateMachineHeightProvider;
type Timeout = ConstU64<1000>;
type UnsignedPriority = RegionsUnsignedPriority;
type RCBlockNumberProvider = RelayBlockNumberProvider;
type TimeslicePeriod = ConstU64<80>;
type WeightInfo = ();
}

Expand Down

0 comments on commit 6c7709a

Please sign in to comment.