Skip to content

Commit

Permalink
Update Bridge.t.sol
Browse files Browse the repository at this point in the history
  • Loading branch information
dantaik committed Mar 28, 2024
1 parent 4943e85 commit 2483b04
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packages/protocol/test/bridge/Bridge.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -763,6 +763,11 @@ contract BridgeTest is TaikoTest {
bytes32[] memory messageHashes = new bytes32[](1);
messageHashes[0] = msgHash;

// Unsuspend a msg that has not been suspended will revert
vm.prank(dest2StepBridge.owner());
vm.expectRevert(Bridge.B_MESSAGE_NOT_SUSPENDED.selector);
dest2StepBridge.suspendMessages(messageHashes, false);

// Suspend that will revert
vm.prank(dest2StepBridge.owner());
vm.expectRevert(Bridge.B_MESSAGE_NOT_PROVEN.selector);
Expand All @@ -775,6 +780,11 @@ contract BridgeTest is TaikoTest {
vm.prank(dest2StepBridge.owner());
dest2StepBridge.suspendMessages(messageHashes, true);

// Suspend again will revert
vm.prank(dest2StepBridge.owner());
vm.expectRevert(Bridge.B_MESSAGE_SUSPENDED.selector);
dest2StepBridge.suspendMessages(messageHashes, true);

// Try to process the message
vm.prank(Alice);
vm.expectRevert(Bridge.B_MESSAGE_SUSPENDED.selector);
Expand Down

0 comments on commit 2483b04

Please sign in to comment.