Prune messages from on-idle callback (#1650)

* prune messages from on-idle callback

* no more secondary lanes at deployments

* clippy

* Update modules/messages/src/lib.rs

Co-authored-by: Adrian Catangiu <adrian@parity.io>

* sub -> add

* more tests + check that message is sent using one of ActiveOutboundLanes

* ensure spent_weight is correct

Co-authored-by: Adrian Catangiu <adrian@parity.io>
This commit is contained in:
Svyatoslav Nikolsky
2022-11-21 13:29:26 +03:00
committed by Bastian Köcher
parent 8e660dd74e
commit eabfea6229
13 changed files with 322 additions and 110 deletions
+2 -1
View File
@@ -442,6 +442,7 @@ parameter_types! {
bp_millau::MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX;
pub const RootAccountForPayments: Option<AccountId> = None;
pub const BridgedChainId: bp_runtime::ChainId = bp_runtime::MILLAU_CHAIN_ID;
pub ActiveOutboundLanes: &'static [bp_messages::LaneId] = &[millau_messages::XCM_LANE];
}
/// Instance of the messages pallet used to relay messages to/from Millau chain.
@@ -450,7 +451,7 @@ pub type WithMillauMessagesInstance = ();
impl pallet_bridge_messages::Config<WithMillauMessagesInstance> for Runtime {
type RuntimeEvent = RuntimeEvent;
type WeightInfo = pallet_bridge_messages::weights::BridgeWeight<Runtime>;
type MaxMessagesToPruneAtOnce = MaxMessagesToPruneAtOnce;
type ActiveOutboundLanes = ActiveOutboundLanes;
type MaxUnrewardedRelayerEntriesAtInboundLane = MaxUnrewardedRelayerEntriesAtInboundLane;
type MaxUnconfirmedMessagesAtInboundLane = MaxUnconfirmedMessagesAtInboundLane;