mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 22:11:02 +00:00
Merge commit '114f487fd9daef4b4cd791446372a9a690c137ac' into update-bridges-subtree-r/w
This commit is contained in:
@@ -239,7 +239,7 @@ pub mod pallet {
|
||||
operational: bool,
|
||||
) -> DispatchResultWithPostInfo {
|
||||
ensure_owner_or_root::<T, I>(origin)?;
|
||||
<IsHalted<T, I>>::put(operational);
|
||||
<IsHalted<T, I>>::put(!operational);
|
||||
|
||||
if operational {
|
||||
log::info!(target: "runtime::bridge-grandpa", "Resuming pallet operations.");
|
||||
@@ -798,9 +798,13 @@ mod tests {
|
||||
#[test]
|
||||
fn pallet_rejects_transactions_if_halted() {
|
||||
run_test(|| {
|
||||
<IsHalted<TestRuntime>>::put(true);
|
||||
initialize_substrate_bridge();
|
||||
|
||||
assert_ok!(Pallet::<TestRuntime>::set_operational(Origin::root(), false));
|
||||
assert_noop!(submit_finality_proof(1), Error::<TestRuntime>::Halted);
|
||||
|
||||
assert_ok!(Pallet::<TestRuntime>::set_operational(Origin::root(), true));
|
||||
assert_ok!(submit_finality_proof(1));
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user