mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 15:41:02 +00:00
* cargo update -p parachain-info * flush * it compiles * clippy * temporary add more logging to cargo deny * Revert "temporary add more logging to cargo deny" This reverts commit 20daa88bca6d9a01dbe933579b1d57ae5c3a7bd8. * list installed Rust binaries before running cargo deny * changed prev commit * once again * try cargo update? * post-update fixes (nothing important)
This commit is contained in:
committed by
Bastian Köcher
parent
b4c7ffd3d3
commit
4d42bb22f3
@@ -66,7 +66,7 @@ pub mod pallet {
|
||||
/// Pay rewards scheme.
|
||||
type PaymentProcedure: PaymentProcedure<Self::AccountId, Self::Reward>;
|
||||
/// Stake and slash scheme.
|
||||
type StakeAndSlash: StakeAndSlash<Self::AccountId, Self::BlockNumber, Self::Reward>;
|
||||
type StakeAndSlash: StakeAndSlash<Self::AccountId, BlockNumberFor<Self>, Self::Reward>;
|
||||
/// Pallet call weights.
|
||||
type WeightInfo: WeightInfoExt;
|
||||
}
|
||||
@@ -117,7 +117,7 @@ pub mod pallet {
|
||||
/// Registration allows relayer to get priority boost for its message delivery transactions.
|
||||
#[pallet::call_index(1)]
|
||||
#[pallet::weight(T::WeightInfo::register())]
|
||||
pub fn register(origin: OriginFor<T>, valid_till: T::BlockNumber) -> DispatchResult {
|
||||
pub fn register(origin: OriginFor<T>, valid_till: BlockNumberFor<T>) -> DispatchResult {
|
||||
let relayer = ensure_signed(origin)?;
|
||||
|
||||
// valid till must be larger than the current block number and the lease must be larger
|
||||
@@ -330,10 +330,10 @@ pub mod pallet {
|
||||
}
|
||||
|
||||
/// Return required registration lease.
|
||||
pub(crate) fn required_registration_lease() -> T::BlockNumber {
|
||||
pub(crate) fn required_registration_lease() -> BlockNumberFor<T> {
|
||||
<T::StakeAndSlash as StakeAndSlash<
|
||||
T::AccountId,
|
||||
T::BlockNumber,
|
||||
BlockNumberFor<T>,
|
||||
T::Reward,
|
||||
>>::RequiredRegistrationLease::get()
|
||||
}
|
||||
@@ -342,7 +342,7 @@ pub mod pallet {
|
||||
pub(crate) fn required_stake() -> T::Reward {
|
||||
<T::StakeAndSlash as StakeAndSlash<
|
||||
T::AccountId,
|
||||
T::BlockNumber,
|
||||
BlockNumberFor<T>,
|
||||
T::Reward,
|
||||
>>::RequiredStake::get()
|
||||
}
|
||||
@@ -383,7 +383,7 @@ pub mod pallet {
|
||||
/// Relayer account that has been registered.
|
||||
relayer: T::AccountId,
|
||||
/// Relayer registration.
|
||||
registration: Registration<T::BlockNumber, T::Reward>,
|
||||
registration: Registration<BlockNumberFor<T>, T::Reward>,
|
||||
},
|
||||
/// Relayer has been `deregistered`.
|
||||
Deregistered {
|
||||
@@ -395,7 +395,7 @@ pub mod pallet {
|
||||
/// Relayer account that has been `deregistered`.
|
||||
relayer: T::AccountId,
|
||||
/// Registration that was removed.
|
||||
registration: Registration<T::BlockNumber, T::Reward>,
|
||||
registration: Registration<BlockNumberFor<T>, T::Reward>,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -445,7 +445,7 @@ pub mod pallet {
|
||||
_,
|
||||
Blake2_128Concat,
|
||||
T::AccountId,
|
||||
Registration<T::BlockNumber, T::Reward>,
|
||||
Registration<BlockNumberFor<T>, T::Reward>,
|
||||
OptionQuery,
|
||||
>;
|
||||
}
|
||||
|
||||
@@ -25,8 +25,8 @@ use bp_relayers::{
|
||||
use frame_support::{parameter_types, traits::fungible::Mutate, weights::RuntimeDbWeight};
|
||||
use sp_core::H256;
|
||||
use sp_runtime::{
|
||||
testing::Header as SubstrateHeader,
|
||||
traits::{BlakeTwo256, ConstU32, IdentityLookup},
|
||||
BuildStorage,
|
||||
};
|
||||
|
||||
pub type AccountId = u64;
|
||||
@@ -43,15 +43,11 @@ pub type TestStakeAndSlash = pallet_bridge_relayers::StakeAndSlashNamed<
|
||||
>;
|
||||
|
||||
type Block = frame_system::mocking::MockBlock<TestRuntime>;
|
||||
type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic<TestRuntime>;
|
||||
|
||||
frame_support::construct_runtime! {
|
||||
pub enum TestRuntime where
|
||||
Block = Block,
|
||||
NodeBlock = Block,
|
||||
UncheckedExtrinsic = UncheckedExtrinsic,
|
||||
pub enum TestRuntime
|
||||
{
|
||||
System: frame_system::{Pallet, Call, Config, Storage, Event<T>},
|
||||
System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
|
||||
Balances: pallet_balances::{Pallet, Event<T>},
|
||||
Relayers: pallet_bridge_relayers::{Pallet, Call, Event<T>},
|
||||
}
|
||||
@@ -67,14 +63,13 @@ parameter_types! {
|
||||
|
||||
impl frame_system::Config for TestRuntime {
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type Index = u64;
|
||||
type Nonce = u64;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type BlockNumber = BlockNumber;
|
||||
type Block = Block;
|
||||
type Hash = H256;
|
||||
type Hashing = BlakeTwo256;
|
||||
type AccountId = AccountId;
|
||||
type Lookup = IdentityLookup<Self::AccountId>;
|
||||
type Header = SubstrateHeader;
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type BlockHashCount = frame_support::traits::ConstU64<250>;
|
||||
type Version = ();
|
||||
@@ -170,7 +165,7 @@ impl PaymentProcedure<AccountId, Balance> for TestPaymentProcedure {
|
||||
|
||||
/// Return test externalities to use in tests.
|
||||
pub fn new_test_ext() -> sp_io::TestExternalities {
|
||||
let t = frame_system::GenesisConfig::default().build_storage::<TestRuntime>().unwrap();
|
||||
let t = frame_system::GenesisConfig::<TestRuntime>::default().build_storage().unwrap();
|
||||
sp_io::TestExternalities::new(t)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user