Skip to content

Commit

Permalink
Update default cook height to 1641601 (#1546)
Browse files Browse the repository at this point in the history
  • Loading branch information
zjshen14 committed Oct 12, 2019
1 parent fb80b0e commit d673834
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
7 changes: 4 additions & 3 deletions blockchain/genesis/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,11 @@ import (

"github.com/iotexproject/go-pkgs/hash"
"github.com/iotexproject/iotex-address/address"
"github.com/iotexproject/iotex-proto/golang/iotextypes"

"github.com/iotexproject/iotex-core/pkg/log"
"github.com/iotexproject/iotex-core/pkg/unit"
"github.com/iotexproject/iotex-core/test/identityset"
"github.com/iotexproject/iotex-proto/golang/iotextypes"
)

// Default contains the default genesis config
Expand All @@ -48,8 +49,8 @@ func defaultConfig() Genesis {
TimeBasedRotation: false,
PacificBlockHeight: 432001,
AleutianBlockHeight: 864001,
BeringBlockHeight: 1382401,
CookBlockHeight: 1555201,
BeringBlockHeight: 1512001,
CookBlockHeight: 1641601,
},
Account: Account{
InitBalanceMap: make(map[string]string),
Expand Down
12 changes: 6 additions & 6 deletions config/heightupgrade_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ func TestNewHeightChange(t *testing.T) {
hu := NewHeightUpgrade(cfg)
require.Equal(uint64(432001), hu.pacificHeight)
require.Equal(uint64(864001), hu.aleutianHeight)
require.Equal(uint64(1382401), hu.beringHeight)
require.Equal(uint64(1555201), hu.cookHeight)
require.Equal(uint64(1512001), hu.beringHeight)
require.Equal(uint64(1641601), hu.cookHeight)

require.True(hu.IsPre(Pacific, uint64(432000)))
require.True(hu.IsPost(Pacific, uint64(432001)))
require.True(hu.IsPre(Aleutian, uint64(864000)))
require.True(hu.IsPost(Aleutian, uint64(864001)))
require.True(hu.IsPre(Bering, uint64(1382400)))
require.True(hu.IsPost(Bering, uint64(1382401)))
require.True(hu.IsPre(Cook, uint64(1555200)))
require.True(hu.IsPost(Cook, uint64(1555201)))
require.True(hu.IsPre(Bering, uint64(1512000)))
require.True(hu.IsPost(Bering, uint64(1512001)))
require.True(hu.IsPre(Cook, uint64(1641600)))
require.True(hu.IsPost(Cook, uint64(1641601)))
}

0 comments on commit d673834

Please sign in to comment.