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 authored and Bastian Köcher committed 2024-04-10 10:28:37 +02:00
1 parent ff342fafa9
commit f8ff3c9142
11 files changed
+218 -104

No files matched your search

+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();