Unify the operating mode for bridge pallets (#1483)

Unify the operating mode for bridge pallets

- define the OperationMode trait and BasicOperatingMode enum
- use the OperationMode trait in all the bridge pallets
- use BasicOperatingMode instead of IsHalted for the Grandpa pallet
- use BasicOperatingMode as part of MessagesOperatingMode

Signed-off-by: Serban Iorga <serban@parity.io>
This commit is contained in:
Serban Iorga
2022-06-28 17:39:07 +03:00
committed by Bastian Köcher
parent ff342fafa9
commit f8ff3c9142
11 changed files with 218 additions and 104 deletions
+2 -1
View File
@@ -400,6 +400,7 @@ mod tests {
run_test, test_relay_header, Origin, TestRuntime, PARAS_PALLET_NAME, UNTRACKED_PARACHAIN_ID,
};
use bp_runtime::BasicOperatingMode;
use bp_test_utils::{authority_list, make_default_justification};
use frame_support::{
assert_noop, assert_ok,
@@ -420,7 +421,7 @@ mod tests {
header: Box::new(test_relay_header(0, state_root)),
authority_list: authority_list(),
set_id: 1,
is_halted: false,
operating_mode: BasicOperatingMode::Normal,
},
)
.unwrap();