Eth1 network exit on wrong network id (#1563)

## Issue Addressed

Fixes #1509 

## Proposed Changes

Exit the beacon node if the eth1 endpoint points to an invalid eth1 network. Check the network id before every eth1 cache update and display an error log if the network id has changed to an invalid one.
This commit is contained in:
Pawan Dhananjay
2020-08-31 02:36:17 +00:00
parent c18d37c202
commit adea7992f8
8 changed files with 97 additions and 3 deletions

View File

@@ -100,7 +100,9 @@ impl<E: EthSpec> ProductionBeaconNode<E> {
"endpoint" => &client_config.eth1.endpoint,
"method" => "json rpc via http"
);
builder.caching_eth1_backend(client_config.eth1.clone())?
builder
.caching_eth1_backend(client_config.eth1.clone())
.await?
} else if client_config.dummy_eth1_backend {
warn!(
log,