Skip to content

Commit

Permalink
Fix 17 hive tests (#8014)
Browse files Browse the repository at this point in the history
  • Loading branch information
somnathb1 authored Aug 14, 2023
1 parent 2a4b1b3 commit 143ff46
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
11 changes: 3 additions & 8 deletions turbo/engineapi/engine_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,14 +171,6 @@ func (s *EngineServer) newPayload(ctx context.Context, req *engine_types.Executi
return nil, &rpc.UnsupportedForkError{Message: "Unsupported fork"}
}

if s.config.IsCancun(header.Time) && (header.BlobGasUsed == nil || header.ExcessBlobGas == nil) {
return nil, &rpc.InvalidParamsError{Message: "blobGasUsed/excessBlobGas missing"}
}

if s.config.IsCancun(header.Time) && header.ParentBeaconBlockRoot == nil {
return nil, &rpc.InvalidParamsError{Message: "parentBeaconBlockRoot missing"}
}

blockHash := req.BlockHash
if header.Hash() != blockHash {
m3, _ := header.MarshalJSON()
Expand Down Expand Up @@ -213,6 +205,9 @@ func (s *EngineServer) newPayload(ctx context.Context, req *engine_types.Executi
for _, tx := range transactions {
actualBlobHashes = append(actualBlobHashes, tx.GetBlobHashes()...)
}
if expectedBlobHashes == nil {
return nil, &rpc.InvalidParamsError{Message: "nil blob hashes array"}
}
if !reflect.DeepEqual(actualBlobHashes, expectedBlobHashes) {
s.logger.Warn("[NewPayload] mismatch in blob hashes",
"expectedBlobHashes", expectedBlobHashes, "actualBlobHashes", actualBlobHashes)
Expand Down
2 changes: 1 addition & 1 deletion turbo/jsonrpc/eth_receipts.go
Original file line number Diff line number Diff line change
Expand Up @@ -775,7 +775,7 @@ func marshalReceipt(receipt *types.Receipt, txn types.Transaction, chainConfig *
log.Error(err.Error())
}
fields["blobGasPrice"] = blobGasPrice
fields["blobGasUsed"] = misc.GetBlobGasUsed(numBlobs)
fields["blobGasUsed"] = hexutil.Uint64(misc.GetBlobGasUsed(numBlobs))
}
}
return fields
Expand Down

0 comments on commit 143ff46

Please sign in to comment.