diff --git a/core/types/block.go b/core/types/block.go index a9c7aac3ee..41f799cf80 100644 --- a/core/types/block.go +++ b/core/types/block.go @@ -224,8 +224,7 @@ type extblock struct { Header *Header Txs []*Transaction Uncles []*Header - Withdrawals []*Withdrawal `rlp:"optional"` - AccessList *bal.BlockAccessList `rlp:"optional"` + Withdrawals []*Withdrawal `rlp:"optional"` } // NewBlock creates a new block. The input data is copied, changes to header and to the @@ -353,7 +352,7 @@ func (b *Block) DecodeRLP(s *rlp.Stream) error { if err := s.Decode(&eb); err != nil { return err } - b.header, b.uncles, b.transactions, b.withdrawals, b.accessList = eb.Header, eb.Uncles, eb.Txs, eb.Withdrawals, eb.AccessList + b.header, b.uncles, b.transactions, b.withdrawals = eb.Header, eb.Uncles, eb.Txs, eb.Withdrawals b.size.Store(rlp.ListSize(size)) return nil } @@ -365,7 +364,6 @@ func (b *Block) EncodeRLP(w io.Writer) error { Txs: b.transactions, Uncles: b.uncles, Withdrawals: b.withdrawals, - AccessList: b.accessList, }) } @@ -536,9 +534,10 @@ func (b *Block) WithBody(body Body) *Block { // WithAccessList returns a copy of the block with the access list embedded. // It does not set the access list hash in the header of the returned block. -// TODO: ^ when support for --experimental.bal is removed, this function should set the access list hash in the header func (b *Block) WithAccessList(accessList *bal.BlockAccessList) *Block { alCopy := accessList.Copy() + alHash := accessList.Hash() + b.header.BlockAccessListHash = &alHash block := &Block{ header: b.header, transactions: slices.Clone(b.transactions),