mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-08 17:26:04 +00:00
Half update some ssz indexes for ssz_block
This commit is contained in:
@@ -52,7 +52,7 @@ impl<'a> SszBlock<'a> {
|
|||||||
* and ensure that length is enough to store at least one attestation
|
* and ensure that length is enough to store at least one attestation
|
||||||
* record.
|
* record.
|
||||||
*/
|
*/
|
||||||
let attestation_len = decode_length(ssz, 72, LENGTH_BYTES)
|
let attestation_len = decode_length(ssz, 80, LENGTH_BYTES)
|
||||||
.map_err(|_| BlockValidatorError::TooShort)?;
|
.map_err(|_| BlockValidatorError::TooShort)?;
|
||||||
if len < (76 + attestation_len + 96) {
|
if len < (76 + attestation_len + 96) {
|
||||||
return Err(BlockValidatorError::TooShort);
|
return Err(BlockValidatorError::TooShort);
|
||||||
@@ -69,7 +69,7 @@ impl<'a> SszBlock<'a> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn parent_hash(&self) -> &[u8] {
|
pub fn parent_hash(&self) -> &[u8] {
|
||||||
&self.ssz[0..32]
|
&self.ssz[5..37]
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn slot_number(&self) -> u64 {
|
pub fn slot_number(&self) -> u64 {
|
||||||
|
|||||||
Reference in New Issue
Block a user