core/types: remove unused field 'td' in Block (#25010)
This commit is contained in:
parent
b60a08d2fd
commit
6160296445
@ -172,10 +172,6 @@ type Block struct {
|
|||||||
hash atomic.Value
|
hash atomic.Value
|
||||||
size 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
|
// These fields are used by package eth to track
|
||||||
// inter-peer block relay.
|
// inter-peer block relay.
|
||||||
ReceivedAt time.Time
|
ReceivedAt time.Time
|
||||||
@ -197,7 +193,7 @@ type extblock struct {
|
|||||||
// are ignored and set to values derived from the given txs, uncles
|
// are ignored and set to values derived from the given txs, uncles
|
||||||
// and receipts.
|
// and receipts.
|
||||||
func NewBlock(header *Header, txs []*Transaction, uncles []*Header, receipts []*Receipt, hasher TrieHasher) *Block {
|
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)
|
// TODO: panic if len(txs) != len(receipts)
|
||||||
if len(txs) == 0 {
|
if len(txs) == 0 {
|
||||||
|
Loading…
Reference in New Issue
Block a user