mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-11 18:04:18 +00:00
Merge branch 'unstable' into eip4844
This commit is contained in:
@@ -407,10 +407,14 @@ impl ProtocolId {
|
||||
/// beginning of the stream, else returns `false`.
|
||||
pub fn has_context_bytes(&self) -> bool {
|
||||
match self.message_name {
|
||||
Protocol::BlocksByRange | Protocol::BlocksByRoot => {
|
||||
!matches!(self.version, Version::V1)
|
||||
}
|
||||
Protocol::BlobsByRange | Protocol::BlobsByRoot | Protocol::LightClientBootstrap => true,
|
||||
Protocol::BlocksByRange | Protocol::BlocksByRoot => match self.version {
|
||||
Version::V2 => true,
|
||||
Version::V1 => false,
|
||||
},
|
||||
Protocol::LightClientBootstrap => match self.version {
|
||||
Version::V2 | Version::V1 => true,
|
||||
},
|
||||
Protocol::BlobsByRoot | Protocol::BlobsByRange => true,
|
||||
Protocol::Goodbye | Protocol::Ping | Protocol::Status | Protocol::MetaData => false,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user