mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 14:01:02 +00:00
BridgeHubRococo/Wococo nits + updated subtree (#2572)
* Nits (merge before separatelly) * Small cosmetics for Rococo/Wococo bridge local run * Squashed 'bridges/' changes from 04b3dda6aa..5fc377ab34 5fc377ab34 Support for kusama-polkadot relaying (#2128) 01f4b7f1ba Fix clippy warnings (#2127) 696ff1c368 BHK/P alignments (#2115) 2a66aa3248 Small fixes (#2126) 7810f1a988 Cosmetics (#2124) daf250f69c Remove some `expect()` statements (#2123) 1c5fba8274 temporarily remove balance guard (#2121) 3d0e547361 Propagate message receival confirmation errors (#2116) 1c33143f07 Propagate message verification errors (#2114) b075b00910 Bump time from 0.3.20 to 0.3.21 51a3a51618 Bump serde from 1.0.160 to 1.0.162 da88d044a6 Bump clap from 4.2.5 to 4.2.7 cdca322cd6 Bump sysinfo from 0.28.4 to 0.29.0 git-subtree-dir: bridges git-subtree-split: 5fc377ab34f7dfd3293099c5feec49255e827812 * Fix * Allow to change storage constants (DeliveryReward, RequiredStakeForStakeAndSlash) + tests * Clippy * New SA for RO/WO * Squashed 'bridges/' changes from 5fc377ab34..0f6091d481 0f6091d481 Bump polkadot/substrate (#2134) 9233f0a337 Bump tokio from 1.28.0 to 1.28.1 a29c1caa93 Bump serde from 1.0.162 to 1.0.163 git-subtree-dir: bridges git-subtree-split: 0f6091d48184ebb4f75cb3089befa6b92cf37335
This commit is contained in:
@@ -24,7 +24,7 @@ use crate::messages_call_ext::{
|
||||
};
|
||||
use bp_messages::{LaneId, MessageNonce};
|
||||
use bp_relayers::{RewardsAccountOwner, RewardsAccountParams};
|
||||
use bp_runtime::{RangeInclusiveExt, StaticStrProvider};
|
||||
use bp_runtime::{Parachain, ParachainIdOf, RangeInclusiveExt, StaticStrProvider};
|
||||
use codec::{Decode, Encode};
|
||||
use frame_support::{
|
||||
dispatch::{CallableCallFor, DispatchInfo, Dispatchable, PostDispatchInfo},
|
||||
@@ -71,9 +71,9 @@ pub trait RefundableParachainId {
|
||||
}
|
||||
|
||||
/// Default implementation of `RefundableParachainId`.
|
||||
pub struct RefundableParachain<Instance, Id>(PhantomData<(Instance, Id)>);
|
||||
pub struct DefaultRefundableParachainId<Instance, Id>(PhantomData<(Instance, Id)>);
|
||||
|
||||
impl<Instance, Id> RefundableParachainId for RefundableParachain<Instance, Id>
|
||||
impl<Instance, Id> RefundableParachainId for DefaultRefundableParachainId<Instance, Id>
|
||||
where
|
||||
Id: Get<u32>,
|
||||
{
|
||||
@@ -81,6 +81,17 @@ where
|
||||
type Id = Id;
|
||||
}
|
||||
|
||||
/// Implementation of `RefundableParachainId` for `trait Parachain`.
|
||||
pub struct RefundableParachain<Instance, Para>(PhantomData<(Instance, Para)>);
|
||||
|
||||
impl<Instance, Para> RefundableParachainId for RefundableParachain<Instance, Para>
|
||||
where
|
||||
Para: Parachain,
|
||||
{
|
||||
type Instance = Instance;
|
||||
type Id = ParachainIdOf<Para>;
|
||||
}
|
||||
|
||||
/// Trait identifying a bridged messages lane. A relayer might be refunded for delivering messages
|
||||
/// coming from this lane.
|
||||
pub trait RefundableMessagesLaneId {
|
||||
@@ -682,7 +693,7 @@ mod tests {
|
||||
bp_runtime::generate_static_str_provider!(TestExtension);
|
||||
type TestExtension = RefundBridgedParachainMessages<
|
||||
TestRuntime,
|
||||
RefundableParachain<(), TestParachain>,
|
||||
DefaultRefundableParachainId<(), TestParachain>,
|
||||
RefundableMessagesLane<(), TestLaneId>,
|
||||
ActualFeeRefund<TestRuntime>,
|
||||
ConstU64<1>,
|
||||
|
||||
Reference in New Issue
Block a user