Skip to content

Commit 1878e20

Browse files
committed
use cfg for test
1 parent 5e00e8d commit 1878e20

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

pallets/subtensor/src/tests/children.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3953,6 +3953,13 @@ fn test_dividend_distribution_with_children_same_coldkey_owner() {
39533953
#[test]
39543954
fn test_pending_cooldown_one_day() {
39553955
let curr_block = 1;
3956+
3957+
let expected_cooldown = if cfg!(feature = "fast-blocks") {
3958+
15
3959+
} else {
3960+
7_200
3961+
};
3962+
39563963
new_test_ext(curr_block).execute_with(|| {
39573964
let coldkey = U256::from(1);
39583965
let hotkey = U256::from(2);
@@ -3980,6 +3987,6 @@ fn test_pending_cooldown_one_day() {
39803987
pending_children.0,
39813988
vec![(proportion1, child1), (proportion2, child2)]
39823989
);
3983-
assert_eq!(pending_children.1, curr_block + 7_200);
3990+
assert_eq!(pending_children.1, curr_block + expected_cooldown);
39843991
});
39853992
}

0 commit comments

Comments
 (0)