miner: add to build block with EIP-4844 blobs (#27875)

---------

Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>
Co-authored-by: Felix Lange <fjl@twurst.com>
This commit is contained in:
lightclient
2023-08-23 23:16:14 +02:00
committed by GitHub
co-authored by Marius van der Wijden Felix Lange
parent d1f6735171
commit feb8f416ac
9 changed files with 114 additions and 72 deletions
+8 -5
View File
@@ -1521,13 +1521,16 @@ func TestBlockToPayloadWithBlobs(t *testing.T) {
}
txs = append(txs, types.NewTx(&inner))
blobs := make([]kzg4844.Blob, 1)
commitments := make([]kzg4844.Commitment, 1)
proofs := make([]kzg4844.Proof, 1)
sidecars := []*types.BlobTxSidecar{
{
Blobs: make([]kzg4844.Blob, 1),
Commitments: make([]kzg4844.Commitment, 1),
Proofs: make([]kzg4844.Proof, 1),
},
}
block := types.NewBlock(&header, txs, nil, nil, trie.NewStackTrie(nil))
envelope := engine.BlockToExecutableData(block, nil, blobs, commitments, proofs)
envelope := engine.BlockToExecutableData(block, nil, sidecars)
var want int
for _, tx := range txs {
want += len(tx.BlobHashes())