mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 02:42:27 +00:00
Add sidecars to execution data
This commit is contained in:
parent
9bd3c47f72
commit
a8512d65de
1 changed files with 13 additions and 2 deletions
|
|
@ -57,7 +57,7 @@ func (e *EthBackendServer) BuildEthBlock(ctx context.Context, buildArgs *types.B
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: we're not adding blobs, but this is not where you would do it anyways
|
// TODO: we're not adding blobs, but this is not where you would do it anyways
|
||||||
return engine.BlockToExecutableData(block, profit, nil), nil
|
return engine.BlockToExecutableData(block, profit, getSidecars(block)), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (e *EthBackendServer) BuildEthBlockFromBundles(ctx context.Context, buildArgs *types.BuildBlockArgs, bundles []types.SBundle) (*engine.ExecutionPayloadEnvelope, error) {
|
func (e *EthBackendServer) BuildEthBlockFromBundles(ctx context.Context, buildArgs *types.BuildBlockArgs, bundles []types.SBundle) (*engine.ExecutionPayloadEnvelope, error) {
|
||||||
|
|
@ -81,9 +81,20 @@ func (e *EthBackendServer) BuildEthBlockFromBundles(ctx context.Context, buildAr
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: we're not adding blobs, but this is not where you would do it anyways
|
// TODO: we're not adding blobs, but this is not where you would do it anyways
|
||||||
return engine.BlockToExecutableData(block, profit, nil), nil
|
return engine.BlockToExecutableData(block, profit, getSidecars(block)), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (e *EthBackendServer) Call(ctx context.Context, contractAddr common.Address, input []byte) ([]byte, error) {
|
func (e *EthBackendServer) Call(ctx context.Context, contractAddr common.Address, input []byte) ([]byte, error) {
|
||||||
return e.b.Call(ctx, contractAddr, input)
|
return e.b.Call(ctx, contractAddr, input)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func getSidecars(block *types.Block) []*types.BlobTxSidecar {
|
||||||
|
sidecars := []*types.BlobTxSidecar{}
|
||||||
|
for _, tx := range block.Transactions() {
|
||||||
|
sidecar := tx.BlobTxSidecar()
|
||||||
|
if sidecar != nil {
|
||||||
|
sidecars = append(sidecars, sidecar)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return sidecars
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue