Skip to content

Commit

Permalink
no voting for parameter #6 anymore
Browse files Browse the repository at this point in the history
  • Loading branch information
kushti committed Oct 4, 2022
1 parent e321014 commit 87dec4f
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions src/main/scala/org/ergoplatform/mining/CandidateGenerator.scala
Original file line number Diff line number Diff line change
Expand Up @@ -495,28 +495,11 @@ object CandidateGenerator extends ScorexLogging {
newParams.blockVersion
)
} else {
val preVotes = currentParams.vote(
val votes = currentParams.vote(
ergoSettings.votingTargets.targets,
stateContext.votingData.epochVotes,
voteForSoftFork
)
// we allow to put vote for parameter #6 (input cost) used for EIP-37 activation,
// even if epoch wasn't started with such a vote
val voteForEip37 = 2400 // 6 == 2400 in the config
val votes = if(newHeight > 843776 &&
newHeight < 844800 + 2048 &&
ergoSettings.votingTargets.targets.get(Parameters.InputCostIncrease).contains(voteForEip37) &&
!preVotes.contains(Parameters.InputCostIncrease)) {
val idx = preVotes.indexWhere(_ == Parameters.NoParameter)
if(idx != -1) {
preVotes.update(idx, Parameters.InputCostIncrease)
preVotes
} else {
preVotes
}
} else {
preVotes
}
(
interlinksExtension,
votes,
Expand Down

0 comments on commit 87dec4f

Please sign in to comment.