mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-29 10:17:57 +00:00
approval distribution: trigger assignment/votes resend based on approval checking lag (#7038)
* Send lag update message Signed-off-by: Andrei Sandu <andrei-mihail@parity.io> * Process ApprovalCheckingLagUpdate Signed-off-by: Andrei Sandu <andrei-mihail@parity.io> * Comput min age based on lag Signed-off-by: Andrei Sandu <andrei-mihail@parity.io> * fix comment Signed-off-by: Andrei Sandu <andrei-mihail@parity.io> * Fix tests Signed-off-by: Andrei Sandu <andrei-mihail@parity.io> * Fix test build Signed-off-by: Andrei Sandu <andrei-mihail@parity.io> * Make the spawnhandle optional Signed-off-by: Andrei Sandu <andrei-mihail@parity.io> * remove unused Signed-off-by: Andrei Sandu <andrei-mihail@parity.io> --------- Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>
This commit is contained in:
@@ -1817,6 +1817,9 @@ fn originator_aggression_l1() {
|
||||
session: 1,
|
||||
};
|
||||
|
||||
let msg = ApprovalDistributionMessage::ApprovalCheckingLagUpdate(level + 1);
|
||||
overseer_send(overseer, msg).await;
|
||||
|
||||
let msg = ApprovalDistributionMessage::NewBlocks(vec![meta]);
|
||||
overseer_send(overseer, msg).await;
|
||||
|
||||
@@ -2071,6 +2074,9 @@ fn non_originator_aggression_l2() {
|
||||
session: 1,
|
||||
};
|
||||
|
||||
let msg = ApprovalDistributionMessage::ApprovalCheckingLagUpdate(level + 1);
|
||||
overseer_send(overseer, msg).await;
|
||||
|
||||
let msg = ApprovalDistributionMessage::NewBlocks(vec![meta]);
|
||||
overseer_send(overseer, msg).await;
|
||||
|
||||
@@ -2097,6 +2103,10 @@ fn non_originator_aggression_l2() {
|
||||
session: 1,
|
||||
};
|
||||
|
||||
let msg = ApprovalDistributionMessage::ApprovalCheckingLagUpdate(
|
||||
aggression_l1_threshold + level + 1,
|
||||
);
|
||||
overseer_send(overseer, msg).await;
|
||||
let msg = ApprovalDistributionMessage::NewBlocks(vec![meta]);
|
||||
overseer_send(overseer, msg).await;
|
||||
|
||||
@@ -2241,6 +2251,8 @@ fn resends_messages_periodically() {
|
||||
session: 1,
|
||||
};
|
||||
|
||||
let msg = ApprovalDistributionMessage::ApprovalCheckingLagUpdate(2);
|
||||
overseer_send(overseer, msg).await;
|
||||
let msg = ApprovalDistributionMessage::NewBlocks(vec![meta]);
|
||||
overseer_send(overseer, msg).await;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user