Improve ergonomics of adding a new network config (#2489)

## Issue Addressed

NA

## Proposed Changes

This PR adds some more fancy macro magic to make it easier to add a new built-in (aka "baked-in") testnet config to the `lighthouse` binary.

Previously, a user needed to modify several files and repeat themselves several times. Now, they only need to add a single definition in the `eth2_config` crate. No repetition 🎉
This commit is contained in:
Paul Hauner
2021-08-30 23:27:28 +00:00
parent b4dd98b3c6
commit 1031f79aca
6 changed files with 191 additions and 66 deletions

7
Cargo.lock generated
View File

@@ -1846,6 +1846,7 @@ dependencies = [
name = "eth2_config"
version = "0.2.0"
dependencies = [
"paste",
"serde",
"serde_derive",
"types",
@@ -4638,6 +4639,12 @@ dependencies = [
"winapi",
]
[[package]]
name = "paste"
version = "1.0.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "acbf547ad0c65e31259204bd90935776d1c693cec2f4ff7abb7a1bbbd40dfe58"
[[package]]
name = "pbkdf2"
version = "0.4.0"