mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-11 18:04:18 +00:00
Update consensus code and tests to v0.12.3 (#1655)
## Proposed Changes Update test vectors for v0.12.3, and introduced configurable `proportional_slashing_multiplier`. Also makes `YamlConfig` a bit safer by making every field access in `apply_to_chain_spec` explicit, and removing the `#[serde(default)]` attribute, which would instantiate missing fields to type defaults! Risky!
This commit is contained in:
@@ -21,11 +21,19 @@ pub fn ssz_decode_file<T: ssz::Decode>(path: &Path) -> Result<T, Error> {
|
||||
})
|
||||
.and_then(|s| {
|
||||
T::from_ssz_bytes(&s).map_err(|e| {
|
||||
Error::FailedToParseTest(format!(
|
||||
"Unable to parse SSZ at {}: {:?}",
|
||||
path.display(),
|
||||
e
|
||||
))
|
||||
match e {
|
||||
// NOTE: this is a bit hacky, but seemingly better than the alternatives
|
||||
ssz::DecodeError::BytesInvalid(message)
|
||||
if message.contains("Blst") || message.contains("Milagro") =>
|
||||
{
|
||||
Error::InvalidBLSInput(message)
|
||||
}
|
||||
e => Error::FailedToParseTest(format!(
|
||||
"Unable to parse SSZ at {}: {:?}",
|
||||
path.display(),
|
||||
e
|
||||
)),
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user