From fee99b3e8d543e16a217cd02ec1b87ba08ceecc2 Mon Sep 17 00:00:00 2001 From: Gustav Simonsson Date: Tue, 5 May 2015 03:09:44 +0200 Subject: [PATCH] Simplify CalculateTD function --- core/chain_manager.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/core/chain_manager.go b/core/chain_manager.go index 29830188e3..71da08f5e2 100644 --- a/core/chain_manager.go +++ b/core/chain_manager.go @@ -52,10 +52,7 @@ func CalculateTD(block, parent *types.Block) *big.Int { if parent == nil { return block.Difficulty() } - - td := new(big.Int).Add(parent.Td, block.Header().Difficulty) - - return td + return new(big.Int).Add(parent.Td, block.Difficulty()) } func CalcGasLimit(parent *types.Block) *big.Int {