|
v1.16.8 |
v1.17.3 |
| Branch |
etc/v1.16.8-full-node |
etc/v1.17.3-full-node |
| Delta |
+55 -0 |
+46 -0 |
Diff between branches
diff --git a/core/headerchain_pow.go b/core/headerchain_pow.go
index 03d198bc0..6767cc800 100644
--- a/core/headerchain_pow.go
+++ b/core/headerchain_pow.go
@@ -40,15 +40,6 @@ func (hc *HeaderChain) GetTd(hash common.Hash, number uint64) *big.Int {
return td
}
-// writeTd calculates and writes TD for a block.
-// Returns the new accumulated TD for the next block.
-func (hc *HeaderChain) writeTd(batch ethdb.KeyValueWriter, hash common.Hash, number uint64, difficulty, parentTd *big.Int) *big.Int {
- newTD := new(big.Int).Add(parentTd, difficulty)
- rawdb.WriteTd(batch, hash, number, newTD)
- hc.tdCache.Add(hash, new(big.Int).Set(newTD))
- return newTD
-}
-
// deleteTd removes TD from the database.
func (hc *HeaderChain) deleteTd(batch ethdb.KeyValueWriter, hash common.Hash, num uint64) {
rawdb.DeleteTd(batch, hash, num)
← Back to Version Comparison