Fix chain_id value in config/deposit_contract RPC method (#2659)

## Issue Addressed

This PR addresses issue #2657

## Proposed Changes

Changes `/eth/v1/config/deposit_contract` endpoint to return the chain ID from the loaded chain spec instead of eth1::DEFAULT_NETWORK_ID which is the Goerli chain ID of 5.

Co-authored-by: Michael Sproul <michael@sigmaprime.io>
This commit is contained in:
Kane Wallmann
2021-10-01 06:32:38 +00:00
parent 21d1af435a
commit 28b79084cd
4 changed files with 35 additions and 2 deletions

View File

@@ -1414,7 +1414,7 @@ pub fn serve<T: BeaconChainTypes>(
Ok(api_types::GenericResponse::from(
api_types::DepositContractData {
address: chain.spec.deposit_contract_address,
chain_id: eth1::DEFAULT_NETWORK_ID.into(),
chain_id: chain.spec.deposit_chain_id,
},
))
})