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:
Michael Sproul
2020-09-26 01:58:29 +00:00
parent 3412a3ec54
commit 258b28469e
9 changed files with 264 additions and 100 deletions

View File

@@ -6,6 +6,8 @@ pub enum Error {
DidntFail(String),
/// Failed to parse the test (internal error).
FailedToParseTest(String),
/// Test case contained invalid BLS data.
InvalidBLSInput(String),
/// Skipped the test because the BLS setting was mismatched.
SkippedBls,
/// Skipped the test because it's known to fail.
@@ -18,6 +20,7 @@ impl Error {
Error::NotEqual(_) => "NotEqual",
Error::DidntFail(_) => "DidntFail",
Error::FailedToParseTest(_) => "FailedToParseTest",
Error::InvalidBLSInput(_) => "InvalidBLSInput",
Error::SkippedBls => "SkippedBls",
Error::SkippedKnownFailure => "SkippedKnownFailure",
}
@@ -28,6 +31,7 @@ impl Error {
Error::NotEqual(m) => m.as_str(),
Error::DidntFail(m) => m.as_str(),
Error::FailedToParseTest(m) => m.as_str(),
Error::InvalidBLSInput(m) => m.as_str(),
_ => self.name(),
}
}