Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions evm-tests/src/subtensor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { convertH160ToSS58, convertPublicKeyToSs58, ethAddressToH160 } from './a
import { tao } from './balance-math'
import internal from "stream";

// create a new subnet and return netuid
// create a new subnet and return netuid
export async function addNewSubnetwork(api: TypedApi<typeof devnet>, hotkey: KeyPair, coldkey: KeyPair) {
const alice = getAliceSigner()
const totalNetworks = await api.query.SubtensorModule.TotalNetworks.getValue()
Expand Down Expand Up @@ -392,13 +392,13 @@ export async function disableAdminFreezeWindowAndOwnerHyperparamRateLimit(api: T
}

const currentOwnerHyperparamRateLimit = await api.query.SubtensorModule.OwnerHyperparamRateLimit.getValue()
if (currentOwnerHyperparamRateLimit !== BigInt(0)) {
if (currentOwnerHyperparamRateLimit !== 0) {
// Set OwnerHyperparamRateLimit to 0
const setOwnerRateLimit = api.tx.AdminUtils.sudo_set_owner_hparam_rate_limit({ limit: BigInt(0) })
const setOwnerRateLimit = api.tx.AdminUtils.sudo_set_owner_hparam_rate_limit({ epochs: 0 })
const sudoOwnerRateTx = api.tx.Sudo.sudo({ call: setOwnerRateLimit.decodedCall })
await waitForTransactionWithRetry(api, sudoOwnerRateTx, alice)
}

assert.equal(0, await api.query.SubtensorModule.AdminFreezeWindow.getValue())
assert.equal(BigInt(0), await api.query.SubtensorModule.OwnerHyperparamRateLimit.getValue())
}
}
2 changes: 1 addition & 1 deletion pallets/admin-utils/src/benchmarking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ mod benchmarks {
// disable admin freeze window
pallet_subtensor::Pallet::<T>::set_admin_freeze_window(0);
#[extrinsic_call]
_(RawOrigin::Root, 10u64/*limit*/)/*sudo_set_owner_hparam_rate_limit*/;
_(RawOrigin::Root, 2u16/*epochs*/)/*sudo_set_owner_hparam_rate_limit*/;
}

#[benchmark]
Expand Down
Loading
Loading