Skip to content

Commit

Permalink
Merge pull request #66 from regen-network/65-Change_PowerReduction_fo…
Browse files Browse the repository at this point in the history
…r_testnet

Closes #65. Change PowerReduction from 1 million to 1 hundred for testnet
  • Loading branch information
aaronc authored Aug 2, 2019
2 parents 7755ced + 8ba7e6c commit 4c723c3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ build:
image: golang:1.11.5
script:
- make install
artifacts:
name: $CI_COMMIT_REF_SLUG
paths:
- "$GOPATH/bin/xrnd"
- "$GOPATH/bin/xrncli"

test:
image: golang:1.11.5
Expand Down
10 changes: 7 additions & 3 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
"github.com/tendermint/tendermint/libs/log"
"io"
"io/ioutil"
"math/big"
"os"
"path/filepath"
//"os"
Expand Down Expand Up @@ -68,6 +69,10 @@ func init() {
geo.AppModuleBasic{},
upgrade.AppModuleBasic{},
)

// this changes the power reduction from 10e6 to 10e2 for the regen-test-1001 testnet which will give
// every validator 10,000 times more voting power than they currently have
sdk.PowerReduction = sdk.NewIntFromBigInt(new(big.Int).Exp(big.NewInt(10), big.NewInt(2), nil))
}

// custom tx codec
Expand Down Expand Up @@ -198,6 +203,8 @@ func NewXrnApp(logger log.Logger, db dbm.DB, traceStore io.Writer, loadLatest bo
app.crisisKeeper = crisis.NewKeeper(crisisSubspace, invCheckPeriod, app.distrKeeper,
app.bankKeeper, app.feeCollectionKeeper)
app.upgradeKeeper = upgrade.NewKeeper(app.upgradeStoreKey, app.cdc)
// this configures a no-op upgrade handler for the "el-choco" upgrade
app.upgradeKeeper.SetUpgradeHandler("el-choco", func(ctx sdk.Context, plan upgrade.Plan) { })

// register the proposal types
govRouter := gov.NewRouter()
Expand All @@ -221,9 +228,6 @@ func NewXrnApp(logger log.Logger, db dbm.DB, traceStore io.Writer, loadLatest bo

app.geoKeeper = geo.NewKeeper(app.geoStoreKey, cdc, app.pgIndexer)

//app.upgradeKeeper = upgrade.NewKeeper(app.upgradeStoreKey, cdc)
//app.upgradeKeeper.SetDoShutdowner(app.shutdownOnUpgrade)

//proposalRouter := proposal.NewRouter().
// AddRoute("esp", app.espKeeper).
// AddRoute("consortium", app.consortiumKeeper)
Expand Down

0 comments on commit 4c723c3

Please sign in to comment.