mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 10:22:23 +00:00
don't copy header fields in WithBody
This commit is contained in:
parent
84ef0db2c0
commit
9e2e8f041d
1 changed files with 3 additions and 3 deletions
|
|
@ -483,13 +483,13 @@ func (b *Block) WithWitness(witness *ExecutionWitness) *Block {
|
||||||
|
|
||||||
block := &Block{
|
block := &Block{
|
||||||
header: b.header,
|
header: b.header,
|
||||||
transactions: slices.Clone(b.transactions),
|
transactions: b.transactions,
|
||||||
uncles: make([]*Header, len(b.uncles)),
|
uncles: make([]*Header, len(b.uncles)),
|
||||||
withdrawals: slices.Clone(b.withdrawals),
|
withdrawals: b.withdrawals,
|
||||||
witness: witness,
|
witness: witness,
|
||||||
}
|
}
|
||||||
for i := range b.uncles {
|
for i := range b.uncles {
|
||||||
block.uncles[i] = CopyHeader(b.uncles[i])
|
block.uncles[i] = b.uncles[i]
|
||||||
}
|
}
|
||||||
return block
|
return block
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue