@@ -355,7 +355,7 @@ func (builder *Builder) buildContractStakingIndexer(forTest bool) error {
355
355
dbConfig .DbPath = builder .cfg .Chain .ContractStakingIndexDBPath
356
356
kvstore := db .NewBoltDB (dbConfig )
357
357
blockDurationFn := func (start uint64 , end uint64 , viewAt uint64 ) time.Duration {
358
- if viewAt < cfg .Genesis .ToBeEnabledBlockHeight {
358
+ if viewAt < cfg .Genesis .WakeBlockHeight {
359
359
return time .Duration (end - start ) * cfg .DardanellesUpgrade .BlockInterval
360
360
}
361
361
return time .Duration (end - start ) * cfg .WakeUpgrade .BlockInterval
@@ -385,7 +385,7 @@ func (builder *Builder) buildContractStakingIndexer(forTest bool) error {
385
385
builder .cfg .Genesis .SystemStakingContractV2Address ,
386
386
builder .cfg .Genesis .SystemStakingContractV2Height ,
387
387
blockDurationFn ,
388
- stakingindex .WithMuteHeight (builder .cfg .Genesis .ToBeEnabledBlockHeight ),
388
+ stakingindex .WithMuteHeight (builder .cfg .Genesis .WakeBlockHeight ),
389
389
)
390
390
builder .cs .contractStakingIndexerV2 = indexer
391
391
}
@@ -727,7 +727,7 @@ func (builder *Builder) registerRollDPoSProtocol() error {
727
727
builder .cfg .Genesis .NumDelegates ,
728
728
builder .cfg .Genesis .NumSubEpochs ,
729
729
rolldpos .EnableDardanellesSubEpoch (builder .cfg .Genesis .DardanellesBlockHeight , builder .cfg .Genesis .DardanellesNumSubEpochs ),
730
- rolldpos .EnableWakeSubEpoch (builder .cfg .Genesis .ToBeEnabledBlockHeight , builder .cfg .Genesis .WakeNumSubEpochs ),
730
+ rolldpos .EnableWakeSubEpoch (builder .cfg .Genesis .WakeBlockHeight , builder .cfg .Genesis .WakeNumSubEpochs ),
731
731
).Register (builder .cs .registry ); err != nil {
732
732
return err
733
733
}
@@ -881,7 +881,7 @@ func (builder *Builder) build(forSubChain, forTest bool) (*ChainService, error)
881
881
// it ignores the influence of the block missing in the blockchain
882
882
// it must >= the real head height of the block
883
883
func estimateTipHeight (cfg * config.Config , blk * block.Block , duration time.Duration ) uint64 {
884
- heights , intervals := []uint64 {0 , cfg .Genesis .DardanellesBlockHeight , cfg .Genesis .ToBeEnabledBlockHeight }, []time.Duration {cfg .Genesis .BlockInterval , cfg .DardanellesUpgrade .BlockInterval , cfg .WakeUpgrade .BlockInterval }
884
+ heights , intervals := []uint64 {0 , cfg .Genesis .DardanellesBlockHeight , cfg .Genesis .WakeBlockHeight }, []time.Duration {cfg .Genesis .BlockInterval , cfg .DardanellesUpgrade .BlockInterval , cfg .WakeUpgrade .BlockInterval }
885
885
tip := blk .Height ()
886
886
interval := intervals [0 ]
887
887
for i := 1 ; i < len (heights ); i ++ {
@@ -902,7 +902,7 @@ func estimateTipHeight(cfg *config.Config, blk *block.Block, duration time.Durat
902
902
903
903
// blockDistance calculates the time duration between two blocks
904
904
func blockDistance (cfg * config.Config , start , end , viewAt uint64 ) time.Duration {
905
- origHeights := []uint64 {0 , cfg .Genesis .DardanellesBlockHeight , cfg .Genesis .ToBeEnabledBlockHeight }
905
+ origHeights := []uint64 {0 , cfg .Genesis .DardanellesBlockHeight , cfg .Genesis .WakeBlockHeight }
906
906
origIntervals := []time.Duration {
907
907
cfg .Genesis .BlockInterval ,
908
908
cfg .DardanellesUpgrade .BlockInterval ,
0 commit comments