lint
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
"extends": ["@0x/tslint-config"],
|
||||
"rules": {
|
||||
"max-classes-per-file": false,
|
||||
"no-non-null-assertion": false
|
||||
"no-non-null-assertion": false,
|
||||
"custom-no-magic-numbers": false
|
||||
}
|
||||
}
|
||||
|
@@ -18,7 +18,7 @@ export class PoolManagementSimulation extends Simulation {
|
||||
const [actions, weights] = _.unzip([
|
||||
...operators.map(operator => [operator.simulationActions.validCreateStakingPool, 0.4]),
|
||||
...operators.map(operator => [operator.simulationActions.validDecreaseStakingPoolOperatorShare, 0.6]),
|
||||
]) as [AsyncIterableIterator<AssertionResult | void>[], number[]];
|
||||
]) as [Array<AsyncIterableIterator<AssertionResult | void>>, number[]];
|
||||
while (true) {
|
||||
const action = Pseudorandom.sample(actions, weights);
|
||||
yield (await action!.next()).value; // tslint:disable-line:no-non-null-assertion
|
||||
|
@@ -27,7 +27,7 @@ export class PoolMembershipSimulation extends Simulation {
|
||||
...makers.map(maker => [maker.simulationActions.validJoinStakingPool, 0.2 / makers.length]),
|
||||
...takers.map(taker => [taker.simulationActions.validFillOrder, 0.6 / takers.length]),
|
||||
[poolManagement.generator, 0.2],
|
||||
]) as [AsyncIterableIterator<AssertionResult | void>[], number[]];
|
||||
]) as [Array<AsyncIterableIterator<AssertionResult | void>>, number[]];
|
||||
|
||||
while (true) {
|
||||
const action = Pseudorandom.sample(actions, weights);
|
||||
|
@@ -22,11 +22,11 @@ export class StakeManagementSimulation extends Simulation {
|
||||
const poolManagement = new PoolManagementSimulation(this.environment);
|
||||
|
||||
const [actions, weights] = _.unzip([
|
||||
...stakers.map(staker => [staker.simulationActions.validStake, 0.3]),
|
||||
...stakers.map(staker => [staker.simulationActions.validUnstake, 0.2]),
|
||||
...stakers.map(staker => [staker.simulationActions.validMoveStake, 0.3]),
|
||||
...stakers.map(staker => [staker.simulationActions.validStake, 0.3 / stakers.length]),
|
||||
...stakers.map(staker => [staker.simulationActions.validUnstake, 0.2 / stakers.length]),
|
||||
...stakers.map(staker => [staker.simulationActions.validMoveStake, 0.3 / stakers.length]),
|
||||
[poolManagement.generator, 0.2],
|
||||
]) as [AsyncIterableIterator<AssertionResult | void>[], number[]];
|
||||
]) as [Array<AsyncIterableIterator<AssertionResult | void>>, number[]];
|
||||
|
||||
while (true) {
|
||||
const action = Pseudorandom.sample(actions, weights);
|
||||
|
@@ -39,7 +39,7 @@ export class StakingRewardsSimulation extends Simulation {
|
||||
...keepers.map(keeper => [keeper.simulationActions.validEndEpoch, 0.1 / keepers.length]),
|
||||
[poolMembership.generator, 0.5],
|
||||
[stakeManagement.generator, 0.2],
|
||||
]) as [AsyncIterableIterator<AssertionResult | void>[], number[]];
|
||||
]) as [Array<AsyncIterableIterator<AssertionResult | void>>, number[]];
|
||||
while (true) {
|
||||
const action = Pseudorandom.sample(actions, weights);
|
||||
yield (await action!.next()).value; // tslint:disable-line:no-non-null-assertion
|
||||
|
@@ -1,6 +1,7 @@
|
||||
{
|
||||
"extends": ["@0x/tslint-config"],
|
||||
"rules": {
|
||||
"no-invalid-this": false
|
||||
"no-invalid-this": false,
|
||||
"custom-no-magic-numbers": false
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user