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
@@ -91,13 +91,14 @@ impl pallet_balances::Config for TestRuntime {
parameter_types! {
pub const TestBridgedChainId: bp_runtime::ChainId = *b"test";
pub ActiveOutboundLanes: &'static [bp_messages::LaneId] = &[[0, 0, 0, 0]];
}
// we're not testing messages pallet here, so values in this config might be crazy
impl pallet_bridge_messages::Config for TestRuntime {
type RuntimeEvent = RuntimeEvent;
type WeightInfo = ();
type MaxMessagesToPruneAtOnce = frame_support::traits::ConstU64<0>;
type ActiveOutboundLanes = ActiveOutboundLanes;
type MaxUnrewardedRelayerEntriesAtInboundLane = frame_support::traits::ConstU64<8>;
type MaxUnconfirmedMessagesAtInboundLane = frame_support::traits::ConstU64<8>;