Commit 43160a1f authored by heyubin's avatar heyubin Committed by vipwzw

add by hyb for lint

parent 57a1fe88
...@@ -404,8 +404,8 @@ func (client *blockSyncClient) addBlock(lastBlock *types.Block, localBlock *pt.P ...@@ -404,8 +404,8 @@ func (client *blockSyncClient) addBlock(lastBlock *types.Block, localBlock *pt.P
//挖矿固定难度 //挖矿固定难度
newBlock.Difficulty = cfg.GetP(0).PowLimitBits newBlock.Difficulty = cfg.GetP(0).PowLimitBits
//需要首先对交易进行排序然后再计算TxHash //需要首先对交易进行排序然后再计算TxHash
if cfg.IsFork(newblock.GetMainHeight(), "ForkRootHash") { if cfg.IsFork(newBlock.GetMainHeight(), "ForkRootHash") {
newblock.Txs = types.TransactionSort(newblock.Txs) newBlock.Txs = types.TransactionSort(newBlock.Txs)
} }
newBlock.TxHash = merkle.CalcMerkleRoot(cfg, newBlock.GetMainHeight(), newBlock.Txs) newBlock.TxHash = merkle.CalcMerkleRoot(cfg, newBlock.GetMainHeight(), newBlock.Txs)
newBlock.BlockTime = localBlock.BlockTime newBlock.BlockTime = localBlock.BlockTime
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment