Skip to content

Commit

Permalink
core/types: remove unused field 'td' in Block (ethereum#25010)
Browse files Browse the repository at this point in the history
  • Loading branch information
zimbabao authored and jagdeep sidhu committed Jun 13, 2022
1 parent 1b208ae commit 61cb1f2
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions core/types/block.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,10 +180,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
Expand Down Expand Up @@ -270,7 +266,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 {
Expand Down

0 comments on commit 61cb1f2

Please sign in to comment.