core/types: remove ils from block

This commit is contained in:
Marius van der Wijden 2024-03-19 01:49:15 +01:00
parent 422b30727d
commit e9aaf928d4

View file

@ -93,9 +93,6 @@ type Header struct {
// ParentBeaconRoot was added by EIP-4788 and is ignored in legacy headers.
ParentBeaconRoot *common.Hash `json:"parentBeaconBlockRoot" rlp:"optional"`
// InclusionListSummaryRoot was added by EIP-7547 and is ignored in legacy headers.
InclusionListSummaryRoot *common.Hash `json:"inclusionListSummaryRoot" rlp:"optional"`
}
// field type overrides for gencodec
@ -174,7 +171,6 @@ type Body struct {
Transactions []*Transaction
Uncles []*Header
Withdrawals []*Withdrawal `rlp:"optional"`
InclusionListSummary []common.Address
}
// Block represents an Ethereum block.
@ -199,7 +195,6 @@ type Block struct {
uncles []*Header
transactions Transactions
withdrawals Withdrawals
inclusionListSummary []common.Address
// caches
hash atomic.Value
@ -217,7 +212,6 @@ type extblock struct {
Txs []*Transaction
Uncles []*Header
Withdrawals []*Withdrawal `rlp:"optional"`
InclusionListSummary []common.Address
}
// NewBlock creates a new block. The input data is copied, changes to header and to the
@ -338,7 +332,7 @@ func (b *Block) EncodeRLP(w io.Writer) error {
// Body returns the non-header content of the block.
// Note the returned data is not an independent copy.
func (b *Block) Body() *Body {
return &Body{b.transactions, b.uncles, b.withdrawals, b.inclusionListSummary}
return &Body{b.transactions, b.uncles, b.withdrawals}
}
// Accessors for body data. These do not return a copy because the content
@ -347,7 +341,6 @@ func (b *Block) Body() *Body {
func (b *Block) Uncles() []*Header { return b.uncles }
func (b *Block) Transactions() Transactions { return b.transactions }
func (b *Block) Withdrawals() Withdrawals { return b.withdrawals }
func (b *Block) InclusionListSummary() []common.Address { return b.inclusionListSummary }
func (b *Block) Transaction(hash common.Hash) *Transaction {
for _, transaction := range b.transactions {
@ -489,20 +482,6 @@ func (b *Block) WithWithdrawals(withdrawals []*Withdrawal) *Block {
return block
}
// WithInclusionList returns a copy of the block containing the given inclusionList.
func (b *Block) WithInclusionList(addresses []common.Address) *Block {
block := &Block{
header: b.header,
transactions: b.transactions,
uncles: b.uncles,
}
if addresses != nil {
block.inclusionListSummary = make([]common.Address, len(addresses))
copy(block.inclusionListSummary, addresses)
}
return block
}
// Hash returns the keccak256 hash of b's header.
// The hash is computed on the first call and cached thereafter.
func (b *Block) Hash() common.Hash {