From 978790b0b6a851b2ea6464edb0bc43f6f4a845fb Mon Sep 17 00:00:00 2001 From: Rajaram Gaunker Date: Wed, 8 Jun 2022 09:31:43 -0700 Subject: [PATCH] core/types: remove unused field 'td' in Block (#25010) --- core/types/block.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/core/types/block.go b/core/types/block.go index a63666a76d79a..f70978e9b2c45 100644 --- a/core/types/block.go +++ b/core/types/block.go @@ -202,10 +202,6 @@ type Block struct { hash atomic.Value size atomic.Value - // Td is used by package core to store the total difficulty - // of the chain up to and including the block. - td *big.Int - // These fields are used by package eth to track // inter-peer block relay. ReceivedAt time.Time @@ -227,7 +223,7 @@ type extblock struct { // are ignored and set to values derived from the given txs, uncles // and receipts. func NewBlock(header *Header, txs []*Transaction, uncles []*Header, receipts []*Receipt, hasher TrieHasher) *Block { - b := &Block{header: CopyHeader(header), td: new(big.Int)} + b := &Block{header: CopyHeader(header)} // TODO: panic if len(txs) != len(receipts) if len(txs) == 0 {