mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-18 21:38:31 +00:00
merge with upstream add context bytes to error log
This commit is contained in:
@@ -32,7 +32,7 @@ pub async fn publish_block<T: BeaconChainTypes>(
|
||||
let block_root = block_root.unwrap_or_else(|| block.canonical_root());
|
||||
|
||||
// Send the block, regardless of whether or not it is valid. The API
|
||||
// specification is very clear that this isa the desired behaviour.
|
||||
// specification is very clear that this is the desired behaviour.
|
||||
let wrapped_block = if matches!(block.as_ref(), &SignedBeaconBlock::Eip4844(_)) {
|
||||
if let Some(sidecar) = chain.blob_cache.pop(&block_root) {
|
||||
let block_and_blobs = SignedBeaconBlockAndBlobsSidecar {
|
||||
|
||||
@@ -716,9 +716,10 @@ fn context_bytes_to_fork_name(
|
||||
.from_context_bytes(context_bytes)
|
||||
.cloned()
|
||||
.ok_or_else(|| {
|
||||
let encoded = hex::encode(context_bytes);
|
||||
RPCError::ErrorResponse(
|
||||
RPCResponseErrorCode::InvalidRequest,
|
||||
"Context bytes does not correspond to a valid fork".to_string(),
|
||||
format!("Context bytes {} do not correspond to a valid fork", encoded),
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user