mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-19 21:04:41 +00:00
Rework internal rpc protocol handling (#4290)
## Issue Addressed Resolves #3980. Builds on work by @GeemoCandama in #4084 ## Proposed Changes Extends the `SupportedProtocol` abstraction added in Geemo's PR and attempts to fix internal versioning of requests that are mentioned in this comment https://github.com/sigp/lighthouse/pull/4084#issuecomment-1496380033 Co-authored-by: geemo <geemo@tutanota.com>
This commit is contained in:
@@ -272,9 +272,11 @@ pub(crate) fn save_metadata_to_disk<E: EthSpec>(
|
||||
log: &slog::Logger,
|
||||
) {
|
||||
let _ = std::fs::create_dir_all(dir);
|
||||
match File::create(dir.join(METADATA_FILENAME))
|
||||
.and_then(|mut f| f.write_all(&metadata.as_ssz_bytes()))
|
||||
{
|
||||
let metadata_bytes = match metadata {
|
||||
MetaData::V1(md) => md.as_ssz_bytes(),
|
||||
MetaData::V2(md) => md.as_ssz_bytes(),
|
||||
};
|
||||
match File::create(dir.join(METADATA_FILENAME)).and_then(|mut f| f.write_all(&metadata_bytes)) {
|
||||
Ok(_) => {
|
||||
debug!(log, "Metadata written to disk");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user