Skip to content

Commit 3817b76

Browse files
author
Samuel Dare
committed
chore: bump arb delay back to 3 days
1 parent 7aaeb09 commit 3817b76

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

pallets/subtensor/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ pub mod pallet {
411411
/// This value represents the default arbitration period in blocks.
412412
/// The period is set to 18 hours, assuming a block time of 12 seconds.
413413
pub fn DefaultArbitrationPeriod<T: Config>() -> u64 {
414-
5400 // 18 hours * 60 minutes/hour * 5 blocks/minute
414+
7200 * 3 // 3 days
415415
}
416416
#[pallet::storage] // ---- StorageItem Global Used Work.
417417
pub type ArbitrationPeriod<T: Config> =

pallets/subtensor/tests/staking.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3192,7 +3192,7 @@ fn test_arbitrated_coldkey_swap_success() {
31923192
);
31933193

31943194
// Check that drain block is set correctly
3195-
let drain_block: u64 = 5400 + 1;
3195+
let drain_block: u64 = 7200 * 3 + 1;
31963196

31973197
log::info!(
31983198
"ColdkeysToSwapAtBlock before scheduling: {:?}",
@@ -3399,7 +3399,7 @@ fn test_arbitrated_coldkey_swap_with_no_stake() {
33993399
));
34003400

34013401
// Make 5400 blocks pass, simulating on_idle for each block
3402-
let drain_block: u64 = 5400 + 1;
3402+
let drain_block: u64 = 7200 * 3 + 1;
34033403
for _ in 0..drain_block {
34043404
next_block();
34053405
SubtensorModule::on_idle(System::block_number(), Weight::MAX);
@@ -3463,7 +3463,7 @@ fn test_arbitrated_coldkey_swap_with_multiple_stakes() {
34633463
));
34643464

34653465
// Make 5400 blocks pass, simulating on_idle for each block
3466-
let drain_block: u64 = 5400 + 1;
3466+
let drain_block: u64 = 7200 * 3 + 1;
34673467
for _ in 0..drain_block {
34683468
next_block();
34693469
SubtensorModule::on_idle(System::block_number(), Weight::MAX);
@@ -3548,7 +3548,7 @@ fn test_arbitrated_coldkey_swap_multiple_arbitrations() {
35483548
);
35493549

35503550
// Simulate the passage of blocks and on_idle calls
3551-
for i in 0..(5400 + 1) {
3551+
for i in 0..(7200 * 3 + 1) {
35523552
next_block();
35533553
SubtensorModule::on_idle(System::block_number(), Weight::MAX);
35543554

@@ -3771,7 +3771,7 @@ fn test_concurrent_arbitrated_coldkey_swaps() {
37713771
nonce2
37723772
));
37733773
// Make 5400 blocks pass
3774-
let drain_block: u64 = 5400 + 1;
3774+
let drain_block: u64 = 7200 * 3 + 1;
37753775
run_to_block(drain_block);
37763776

37773777
// Run arbitration

0 commit comments

Comments
 (0)