core: add BeaconRoot to header in GenerateChain (#27974)

Fixes an error in tests of internal/ethapi.
This commit is contained in:
Felix Lange 2023-08-22 18:29:17 +02:00 committed by GitHub
parent 8d2492982b
commit 4c7053baf1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 15 additions and 14 deletions

View File

@ -411,6 +411,7 @@ func makeHeader(chain consensus.ChainReader, parent *types.Block, state *state.S
excessBlobGas := eip4844.CalcExcessBlobGas(parentExcessBlobGas, parentBlobGasUsed) excessBlobGas := eip4844.CalcExcessBlobGas(parentExcessBlobGas, parentBlobGasUsed)
header.ExcessBlobGas = &excessBlobGas header.ExcessBlobGas = &excessBlobGas
header.BlobGasUsed = new(uint64) header.BlobGasUsed = new(uint64)
header.BeaconRoot = new(common.Hash)
} }
return header return header
} }

View File

@ -2,7 +2,7 @@
{ {
"blobGasPrice": "0x1", "blobGasPrice": "0x1",
"blobGasUsed": "0x20000", "blobGasUsed": "0x20000",
"blockHash": "0x2ffcbc982ea819900e22b96c72bc85c8c64e080b9479d1c68ee49f55564816e7", "blockHash": "0xe724dfd4349861f4dceef2bc4df086d0a3d88858214f6bee9fcf1bebd1edc2a6",
"blockNumber": "0x6", "blockNumber": "0x6",
"contractAddress": null, "contractAddress": null,
"cumulativeGasUsed": "0x5208", "cumulativeGasUsed": "0x5208",

View File

@ -1,6 +1,6 @@
[ [
{ {
"blockHash": "0xc7f8a266e8bee4e36fd6374ebb280b16b4ec881e865f9d69e3c8743a71f0197e", "blockHash": "0x1e7dcf3abe8bf05d32367a5dc387caa32578b15871bf8b3cbeedf2d8d530f844",
"blockNumber": "0x2", "blockNumber": "0x2",
"contractAddress": "0xae9bea628c4ce503dcfd7e305cab4e29e7476592", "contractAddress": "0xae9bea628c4ce503dcfd7e305cab4e29e7476592",
"cumulativeGasUsed": "0xcf50", "cumulativeGasUsed": "0xcf50",

View File

@ -1,6 +1,6 @@
[ [
{ {
"blockHash": "0xa85ac2ee14add4cf9e92f1a023b4c9eac355266f9e87e70bdcd557d848c61305", "blockHash": "0xffa737e6ce9a9162ffd411dd06169114b3ed5ee9fc1474a2625c92548e4455e0",
"blockNumber": "0x4", "blockNumber": "0x4",
"contractAddress": null, "contractAddress": null,
"cumulativeGasUsed": "0x538d", "cumulativeGasUsed": "0x538d",

View File

@ -1,6 +1,6 @@
[ [
{ {
"blockHash": "0x790f05c0ce7b6add0c7b1e8a777811738c540436e898ae6b09688dacc6581254", "blockHash": "0x173dcd9d22ce71929cd17e84ea88702a0f84d6244c6898d2a4f48722e494fe9c",
"blockNumber": "0x3", "blockNumber": "0x3",
"contractAddress": null, "contractAddress": null,
"cumulativeGasUsed": "0x5e28", "cumulativeGasUsed": "0x5e28",
@ -19,7 +19,7 @@
"blockNumber": "0x3", "blockNumber": "0x3",
"transactionHash": "0xeaf3921cbf03ba45bad4e6ab807b196ce3b2a0b5bacc355b6272fa96b11b4287", "transactionHash": "0xeaf3921cbf03ba45bad4e6ab807b196ce3b2a0b5bacc355b6272fa96b11b4287",
"transactionIndex": "0x0", "transactionIndex": "0x0",
"blockHash": "0x790f05c0ce7b6add0c7b1e8a777811738c540436e898ae6b09688dacc6581254", "blockHash": "0x173dcd9d22ce71929cd17e84ea88702a0f84d6244c6898d2a4f48722e494fe9c",
"logIndex": "0x0", "logIndex": "0x0",
"removed": false "removed": false
} }

View File

@ -1,6 +1,6 @@
[ [
{ {
"blockHash": "0x698945ab39ebe6cecff84886b3142630cf03a74b2c19eec8043534463a6ff60b", "blockHash": "0xa8a067b3cb3b9ddc6cfb8317bfd08b266fcf9994fc870c1f7ed394acecfadf39",
"blockNumber": "0x1", "blockNumber": "0x1",
"contractAddress": null, "contractAddress": null,
"cumulativeGasUsed": "0x5208", "cumulativeGasUsed": "0x5208",

View File

@ -2,7 +2,7 @@
{ {
"blobGasPrice": "0x1", "blobGasPrice": "0x1",
"blobGasUsed": "0x20000", "blobGasUsed": "0x20000",
"blockHash": "0x2ffcbc982ea819900e22b96c72bc85c8c64e080b9479d1c68ee49f55564816e7", "blockHash": "0xe724dfd4349861f4dceef2bc4df086d0a3d88858214f6bee9fcf1bebd1edc2a6",
"blockNumber": "0x6", "blockNumber": "0x6",
"contractAddress": null, "contractAddress": null,
"cumulativeGasUsed": "0x5208", "cumulativeGasUsed": "0x5208",

View File

@ -1,7 +1,7 @@
{ {
"blobGasPrice": "0x1", "blobGasPrice": "0x1",
"blobGasUsed": "0x20000", "blobGasUsed": "0x20000",
"blockHash": "0x2ffcbc982ea819900e22b96c72bc85c8c64e080b9479d1c68ee49f55564816e7", "blockHash": "0xe724dfd4349861f4dceef2bc4df086d0a3d88858214f6bee9fcf1bebd1edc2a6",
"blockNumber": "0x6", "blockNumber": "0x6",
"contractAddress": null, "contractAddress": null,
"cumulativeGasUsed": "0x5208", "cumulativeGasUsed": "0x5208",

View File

@ -1,5 +1,5 @@
{ {
"blockHash": "0xc7f8a266e8bee4e36fd6374ebb280b16b4ec881e865f9d69e3c8743a71f0197e", "blockHash": "0x1e7dcf3abe8bf05d32367a5dc387caa32578b15871bf8b3cbeedf2d8d530f844",
"blockNumber": "0x2", "blockNumber": "0x2",
"contractAddress": "0xae9bea628c4ce503dcfd7e305cab4e29e7476592", "contractAddress": "0xae9bea628c4ce503dcfd7e305cab4e29e7476592",
"cumulativeGasUsed": "0xcf50", "cumulativeGasUsed": "0xcf50",

View File

@ -1,5 +1,5 @@
{ {
"blockHash": "0x0ccd45c62e8af3a4cd7db1045c2bfeffe5c027749506ec94a744c11f69e5c785", "blockHash": "0x3fadc5bc916018a326732be829a2565b3acb960a8406f0f151a5e1fa971ea7dd",
"blockNumber": "0x5", "blockNumber": "0x5",
"contractAddress": "0xfdaa97661a584d977b4d3abb5370766ff5b86a18", "contractAddress": "0xfdaa97661a584d977b4d3abb5370766ff5b86a18",
"cumulativeGasUsed": "0xe01c", "cumulativeGasUsed": "0xe01c",

View File

@ -1,5 +1,5 @@
{ {
"blockHash": "0xa85ac2ee14add4cf9e92f1a023b4c9eac355266f9e87e70bdcd557d848c61305", "blockHash": "0xffa737e6ce9a9162ffd411dd06169114b3ed5ee9fc1474a2625c92548e4455e0",
"blockNumber": "0x4", "blockNumber": "0x4",
"contractAddress": null, "contractAddress": null,
"cumulativeGasUsed": "0x538d", "cumulativeGasUsed": "0x538d",

View File

@ -1,5 +1,5 @@
{ {
"blockHash": "0x698945ab39ebe6cecff84886b3142630cf03a74b2c19eec8043534463a6ff60b", "blockHash": "0xa8a067b3cb3b9ddc6cfb8317bfd08b266fcf9994fc870c1f7ed394acecfadf39",
"blockNumber": "0x1", "blockNumber": "0x1",
"contractAddress": null, "contractAddress": null,
"cumulativeGasUsed": "0x5208", "cumulativeGasUsed": "0x5208",

View File

@ -1,5 +1,5 @@
{ {
"blockHash": "0x790f05c0ce7b6add0c7b1e8a777811738c540436e898ae6b09688dacc6581254", "blockHash": "0x173dcd9d22ce71929cd17e84ea88702a0f84d6244c6898d2a4f48722e494fe9c",
"blockNumber": "0x3", "blockNumber": "0x3",
"contractAddress": null, "contractAddress": null,
"cumulativeGasUsed": "0x5e28", "cumulativeGasUsed": "0x5e28",
@ -18,7 +18,7 @@
"blockNumber": "0x3", "blockNumber": "0x3",
"transactionHash": "0xeaf3921cbf03ba45bad4e6ab807b196ce3b2a0b5bacc355b6272fa96b11b4287", "transactionHash": "0xeaf3921cbf03ba45bad4e6ab807b196ce3b2a0b5bacc355b6272fa96b11b4287",
"transactionIndex": "0x0", "transactionIndex": "0x0",
"blockHash": "0x790f05c0ce7b6add0c7b1e8a777811738c540436e898ae6b09688dacc6581254", "blockHash": "0x173dcd9d22ce71929cd17e84ea88702a0f84d6244c6898d2a4f48722e494fe9c",
"logIndex": "0x0", "logIndex": "0x0",
"removed": false "removed": false
} }