Skip to content

Commit

Permalink
injecting init value for sub-blocks per blocks on block version v4
Browse files Browse the repository at this point in the history
  • Loading branch information
kushti committed Oct 17, 2024
1 parent 1933061 commit c702de9
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,13 @@ class Parameters(val height: Height,
if (softForkStartingHeight.nonEmpty
&& height == softForkStartingHeight.get + votingEpochLength * (votingEpochs + activationEpochs)
&& softForkApproved(votes)) {
table = table.updated(BlockVersion, table(BlockVersion) + 1)
val newVersion = table(BlockVersion) + 1

// insert sub-blocks per block parameter on block version v4 (protocol v6) activation
if (newVersion == 4) {
table = table.updated(SubblocksPerBlockIncrease, SubblocksPerBlockDefault)
}
table = table.updated(BlockVersion, newVersion)
activatedUpdate = proposedUpdate
}

Expand Down

0 comments on commit c702de9

Please sign in to comment.