mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-23 05:06:43 +00:00
Simplify CalculateTD function
This commit is contained in:
parent
ac85fdc75e
commit
fee99b3e8d
1 changed files with 1 additions and 4 deletions
|
|
@ -52,10 +52,7 @@ func CalculateTD(block, parent *types.Block) *big.Int {
|
||||||
if parent == nil {
|
if parent == nil {
|
||||||
return block.Difficulty()
|
return block.Difficulty()
|
||||||
}
|
}
|
||||||
|
return new(big.Int).Add(parent.Td, block.Difficulty())
|
||||||
td := new(big.Int).Add(parent.Td, block.Header().Difficulty)
|
|
||||||
|
|
||||||
return td
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func CalcGasLimit(parent *types.Block) *big.Int {
|
func CalcGasLimit(parent *types.Block) *big.Int {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue