Skip to content

Commit

Permalink
feat: resetFailedMessages
Browse files Browse the repository at this point in the history
  • Loading branch information
ChiTimesChi committed Sep 19, 2024
1 parent 4f76cec commit bc149c5
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions contracts/messaging/MessageBusManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,14 @@ contract MessageBusManager is IManager, Ownable {
transferOwnership(owner_);
}

function resetFailedMessages(bytes32[] calldata messageIds) external {
// TODO: implement
function resetFailedMessages(bytes32[] calldata messageIds) external onlyOwner {
for (uint256 i = 0; i < messageIds.length; i++) {
bytes32 messageId = messageIds[i];
if (getExecutedMessage(messageId) != IManageable.TxStatus.Fail) {
revert MessageBusManager__NotFailed(messageId);
}
IManageable(MESSAGE_BUS).updateMessageStatus(messageId, IManageable.TxStatus.Null);
}
}

// ═════════════════════════════════════════════ GENERIC MANAGING ══════════════════════════════════════════════════
Expand Down

0 comments on commit bc149c5

Please sign in to comment.