Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rpcdaemon: fix mismatch in erigon_getHeaderBy[Hash|Number] #2454

Merged
merged 12 commits into from
Oct 29, 2024
Next Next commit
add requestsHash field
lupin012 committed Oct 26, 2024
commit 189fd5eb53a19035e22d47925d2b4d9ce88b5ff0
1 change: 1 addition & 0 deletions silkworm/rpc/json/types.cpp
Original file line number Diff line number Diff line change
@@ -233,6 +233,7 @@ void to_json(nlohmann::json& json, const BlockHeader& header) {
json["Verkle"] = false;
json["VerkleKeyVals"] = nullptr;
json["VerkleProof"] = nullptr;
json["requestsHash"] = nullptr;
}
if (header.blob_gas_used) {
json["blobGasUsed"] = rpc::to_quantity(*header.blob_gas_used);
3 changes: 3 additions & 0 deletions silkworm/rpc/json/types_test.cpp
Original file line number Diff line number Diff line change
@@ -195,6 +195,7 @@ TEST_CASE("serialize empty block header", "[rpc][to_json]") {
"Verkle":false,
"VerkleKeyVals":null,
"VerkleProof":null,
"requestsHash":null,
"blobGasUsed":null,
"excessBlobGas": null,
"parentBeaconBlockRoot": null
@@ -250,6 +251,7 @@ TEST_CASE("serialize block header", "[rpc][to_json]") {
"Verkle":false,
"VerkleKeyVals":null,
"VerkleProof":null,
"requestsHash":null,
"blobGasUsed":null,
"excessBlobGas": null,
"parentBeaconBlockRoot": null
@@ -308,6 +310,7 @@ TEST_CASE("serialize block header with baseFeePerGas", "[rpc][to_json]") {
"Verkle":false,
"VerkleKeyVals":null,
"VerkleProof":null,
"requestsHash":null,
"blobGasUsed":null,
"excessBlobGas": null,
"parentBeaconBlockRoot": null