Fix BlocksByRootRequest min/max bounds calculation (#1312)
This commit is contained in:
parent
2ccb9f48da
commit
d4dd9fae07
@ -188,7 +188,7 @@ pub struct BlocksByRangeRequest {
|
||||
}
|
||||
|
||||
/// Request a number of beacon block bodies from a peer.
|
||||
#[derive(Encode, Decode, Clone, Debug, PartialEq)]
|
||||
#[derive(Clone, Debug, PartialEq)]
|
||||
pub struct BlocksByRootRequest {
|
||||
/// The list of beacon block bodies being requested.
|
||||
pub block_roots: VariableList<Hash256, MaxRequestBlocks>,
|
||||
|
@ -43,18 +43,16 @@ lazy_static! {
|
||||
}
|
||||
.as_ssz_bytes()
|
||||
.len();
|
||||
pub static ref BLOCKS_BY_ROOT_REQUEST_MIN: usize = BlocksByRootRequest {
|
||||
block_roots: VariableList::<Hash256, MaxRequestBlocks>::from(Vec::<Hash256>::new())
|
||||
}
|
||||
pub static ref BLOCKS_BY_ROOT_REQUEST_MIN: usize =
|
||||
VariableList::<Hash256, MaxRequestBlocks>::from(Vec::<Hash256>::new())
|
||||
.as_ssz_bytes()
|
||||
.len();
|
||||
pub static ref BLOCKS_BY_ROOT_REQUEST_MAX: usize = BlocksByRootRequest {
|
||||
block_roots: VariableList::<Hash256, MaxRequestBlocks>::from(vec![
|
||||
pub static ref BLOCKS_BY_ROOT_REQUEST_MAX: usize =
|
||||
VariableList::<Hash256, MaxRequestBlocks>::from(vec![
|
||||
Hash256::zero();
|
||||
MAX_REQUEST_BLOCKS
|
||||
as usize
|
||||
])
|
||||
}
|
||||
.as_ssz_bytes()
|
||||
.len();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user