Skip to content

Commit

Permalink
Merge pull request #1721 from w3f/will-dem-clean
Browse files Browse the repository at this point in the history
bump version to v2.5.99
  • Loading branch information
wpank authored Mar 25, 2022
2 parents 1efbe37 + b241a25 commit e8d684d
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion charts/otv-backend/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
description: 1K Validators Backend
name: otv-backend
version: v2.5.98
version: v2.5.99
apiVersion: v2
4 changes: 2 additions & 2 deletions helmfile.d/10-otv-backend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ releases:
namespace: kusama
{{ if eq .Environment.Name "production" }}
chart: w3f/otv-backend
version: v2.5.98
version: v2.5.99
{{ else }}
chart: ../charts/otv-backend
{{ end }}
Expand All @@ -23,7 +23,7 @@ releases:
namespace: polkadot
{{ if eq .Environment.Name "production" }}
chart: w3f/otv-backend
version: v2.5.98
version: v2.5.99
{{ else }}
chart: ../charts/otv-backend
{{ end }}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "1k-validators-be",
"version": "2.5.98",
"version": "2.5.99",
"description": "Services for running the Thousand Validator Program.",
"main": "index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import { startClearAccumulatedOfflineTimeJob, startMonitorJob } from "./cron";

const isCI = process.env.CI;

const version = "v2.5.98";
const version = "v2.5.99";

const catchAndQuit = async (fn: any) => {
try {
Expand Down
12 changes: 6 additions & 6 deletions src/score.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,14 +205,14 @@ export const scoreDemocracyVotes = (
);

// The consistency of all historical votes, capped at 1.5x
const totalConsistencyMultiplier = totalConsistency
? Math.min(1 + 1 / totalConsistency.length, 1.5)
: 1;
const totalConsistencyMultiplier =
totalConsistency?.length > 0
? Math.min(1 + 1 / totalConsistency.length, 1.5)
: 1;

// The consistency of only the last _threshold_ votes
const lastConsistencyMultiplier = lastConsistency
? 1 + 1 / lastConsistency.length
: 1;
const lastConsistencyMultiplier =
lastConsistency?.length > 0 ? 1 + 1 / lastConsistency.length : 1;

// Calculate the total score, capping it at 250 points
const totalDemScore = Math.min(
Expand Down

0 comments on commit e8d684d

Please sign in to comment.