Skip to content

Commit 1216305

Browse files
committed
refactor(gamma): big decimal
1 parent 72e6c8f commit 1216305

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/chain-libs/chain-impl-mockchain/src/vote/tally.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ impl TallyResult {
176176
const GAMMA: &str = "QUADRATIC_VOTING_GAMMA";
177177
const PRECISION: &str = "QUADRATIC_VOTING_PRECISION";
178178

179+
// Apply quadratic scaling if gamma value specified in env var. Else gamma is 1 and has no effect.
179180
let gamma = env::var(GAMMA).unwrap_or(1.to_string());
180181
let precision =
181182
i64::from_str(&env::var(PRECISION).unwrap_or(1.to_string())).unwrap_or(1);

src/chain-libs/chain-vote/src/tally.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ impl EncryptedTally {
168168
const GAMMA: &str = "QUADRATIC_VOTING_GAMMA";
169169
const PRECISION: &str = "QUADRATIC_VOTING_PRECISION";
170170

171+
// Apply quadratic scaling if gamma value specified in env var. Else gamma is 1 and has no effect.
171172
let gamma = env::var(GAMMA).unwrap_or(1.to_string());
172173
let precision = i64::from_str(&env::var(PRECISION).unwrap_or(1.to_string())).unwrap_or(1);
173174

0 commit comments

Comments
 (0)