mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-12 01:41:36 +00:00
core/types: add accessList to WithSeal and WithBody
This commit is contained in:
parent
bcb0efd756
commit
b3687452c5
1 changed files with 4 additions and 0 deletions
|
|
@ -505,6 +505,7 @@ func (b *Block) WithSeal(header *Header) *Block {
|
|||
transactions: b.transactions,
|
||||
uncles: b.uncles,
|
||||
withdrawals: b.withdrawals,
|
||||
accessList: b.accessList,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -517,6 +518,9 @@ func (b *Block) WithBody(body Body) *Block {
|
|||
uncles: make([]*Header, len(body.Uncles)),
|
||||
withdrawals: slices.Clone(body.Withdrawals),
|
||||
}
|
||||
if b.accessList != nil {
|
||||
block.accessList = b.accessList.Copy()
|
||||
}
|
||||
for i := range body.Uncles {
|
||||
block.uncles[i] = CopyHeader(body.Uncles[i])
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue