mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-03 00:31:50 +00:00
Pretty-print EIP-3076 tests (#1977)
## Proposed Changes * Pretty-print the EIP-3076 tests to match https://github.com/eth2-clients/slashing-protection-interchange-tests/pull/4 * Move the `curl` invocation that downloads the tests to the test executor, removing the build script (closes #1982)
This commit is contained in:
@@ -5,6 +5,7 @@ use slashing_protection::interchange_test::{MultiTestCase, TestCase};
|
||||
use slashing_protection::test_utils::{pubkey, DEFAULT_GENESIS_VALIDATORS_ROOT};
|
||||
use slashing_protection::SUPPORTED_INTERCHANGE_FORMAT_VERSION;
|
||||
use std::fs::{self, File};
|
||||
use std::io::Write;
|
||||
use std::path::Path;
|
||||
use types::{Epoch, Hash256, Slot};
|
||||
|
||||
@@ -346,6 +347,7 @@ fn main() {
|
||||
for test in tests {
|
||||
test.run();
|
||||
let f = File::create(output_dir.join(format!("{}.json", test.name))).unwrap();
|
||||
serde_json::to_writer(f, &test).unwrap();
|
||||
serde_json::to_writer_pretty(&f, &test).unwrap();
|
||||
writeln!(&f).unwrap();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user