Skip to content

Commit

Permalink
Hotfix merkle root
Browse files Browse the repository at this point in the history
  • Loading branch information
yograterol committed Jun 4, 2019
1 parent cc3fe98 commit 68feea7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 3 additions & 1 deletion consensus/ethash/consensus.go
Original file line number Diff line number Diff line change
Expand Up @@ -648,10 +648,12 @@ func callistoAccumulateRewards(config *params.ChainConfig, state *state.StateDB,
blockReward := CLOMinerReward
treasuryReward := CLOTreasuryReward
stakeReward := CLOStakeReward
stakeAddress := CLOStakeAddress

if config.IsCLOHF1(header.Number) {
treasuryReward = CLOHF1TreasuryReward
stakeReward = CLOHF1StakeReward
stakeAddress = CLOHF1StakeAddress
}

monetaryPolicyStep := big.NewInt(0)
Expand Down Expand Up @@ -679,5 +681,5 @@ func callistoAccumulateRewards(config *params.ChainConfig, state *state.StateDB,

state.AddBalance(header.Coinbase, reward)
state.AddBalance(CLOTreasuryAddress, treasuryReward)
state.AddBalance(CLOHF1StakeAddress, stakeReward)
state.AddBalance(stakeAddress, stakeReward)
}
1 change: 1 addition & 0 deletions core/pirl_guard.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ func (bc *BlockChain) checkChainForAttack(blocks types.Blocks, activationBlock u
}
}
}

p := make(PairList, len(timeMap))
index := 0
for k, v := range timeMap {
Expand Down
5 changes: 3 additions & 2 deletions params/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ var (
EIP158Block: big.NewInt(10),
ByzantiumBlock: big.NewInt(20),
CLOHF1Block: big.NewInt(1400000),
CLOMPBlock: big.NewInt(2900000),
CLOMPBlock: big.NewInt(2900001),
ConstantinopleBlock: big.NewInt(3100000),
PetersburgBlock: big.NewInt(3100000),
Ethash: new(EthashConfig),
Expand Down Expand Up @@ -277,7 +277,7 @@ func (c *ChainConfig) String() string {
default:
engine = "unknown"
}
return fmt.Sprintf("{ChainID: %v Homestead: %v DAO: %v DAOSupport: %v EIP150: %v EIP155: %v EIP158: %v Byzantium: %v Constantinople: %v ConstantinopleFix: %v CLOHF1: %v Engine: %v}",
return fmt.Sprintf("{ChainID: %v Homestead: %v DAO: %v DAOSupport: %v EIP150: %v EIP155: %v EIP158: %v Byzantium: %v Constantinople: %v ConstantinopleFix: %v CLOHF1: %v CLOMP: %v Engine: %v}",
c.ChainID,
c.HomesteadBlock,
c.DAOForkBlock,
Expand All @@ -289,6 +289,7 @@ func (c *ChainConfig) String() string {
c.ConstantinopleBlock,
c.PetersburgBlock,
c.CLOHF1Block,
c.CLOMPBlock,
engine,
)
}
Expand Down

0 comments on commit 68feea7

Please sign in to comment.