Skip to content

Commit

Permalink
feat: sudo remove timed out drs
Browse files Browse the repository at this point in the history
  • Loading branch information
gluax committed Sep 26, 2024
1 parent c567558 commit bdee0c0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/msgs/data_requests/sudo/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ impl From<PostResult> for crate::msgs::SudoMsg {
pub enum SudoMsg {
PostDataResult(PostResult),
PostDataResults(post_results::Sudo),
RemoveTimedOutDataRequests,
}

impl From<SudoMsg> for super::SudoMsg {
Expand Down
12 changes: 11 additions & 1 deletion src/msgs/data_requests/sudo_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use serde_json::json;

#[cfg(feature = "cosmwasm")]
use super::Bytes;
use super::{sudo::*, DataResult, SudoMsg};
use super::{DataResult, SudoMsg, sudo::*};
use crate::msgs::*;

#[test]
Expand Down Expand Up @@ -63,3 +63,13 @@ fn json_post_result() {
#[cfg(feature = "cosmwasm")]
assert_json_deser(msg, expected_json);
}

#[test]
fn json_remove_timed_out_data_requests() {
let expected_json = json!("remove_timed_out_data_requests");
let msg: SudoMsg = data_requests::sudo::SudoMsg::RemoveTimedOutDataRequests.into();
#[cfg(not(feature = "cosmwasm"))]
assert_json_ser(msg, expected_json);
#[cfg(feature = "cosmwasm")]
assert_json_deser(msg, expected_json);
}

0 comments on commit bdee0c0

Please sign in to comment.