mirror of
https://github.com/status-im/nimbus-eth2.git
synced 2025-02-17 08:56:45 +00:00
remove a few obsolete raises pops (#2654)
This commit is contained in:
parent
96c489bb3d
commit
a5711ecf18
@ -770,8 +770,6 @@ template getBlockProposalData*(m: Eth1Monitor,
|
||||
finalizedStateDepositIndex: uint64): BlockProposalEth1Data =
|
||||
getBlockProposalData(m.eth1Chain, state, finalizedEth1Data, finalizedStateDepositIndex)
|
||||
|
||||
{.pop.}
|
||||
|
||||
proc new(T: type Web3DataProvider,
|
||||
depositContractAddress: Eth1Address,
|
||||
web3Url: string): Future[Result[Web3DataProviderRef, string]] {.async.} =
|
||||
|
@ -183,8 +183,6 @@ proc checkForPotentialDoppelganger(
|
||||
attestation = shortLog(attestation)
|
||||
quit QuitFailure
|
||||
|
||||
{.pop.} # async can raise anything
|
||||
|
||||
proc attestationValidator*(
|
||||
self: ref Eth2Processor,
|
||||
attestation: Attestation,
|
||||
|
@ -199,9 +199,7 @@ const
|
||||
pyrmontMetadata* = eth2testnet "shared/pyrmont"
|
||||
praterMetadata* = eth2testnet "shared/prater"
|
||||
|
||||
{.pop.} # the following pocedures raise more than just `Defect`
|
||||
|
||||
proc getMetadataForNetwork*(networkName: string): Eth2NetworkMetadata =
|
||||
proc getMetadataForNetwork*(networkName: string): Eth2NetworkMetadata {.raises: [Defect, IOError].} =
|
||||
var
|
||||
metadata = case toLowerAscii(networkName)
|
||||
of "mainnet":
|
||||
@ -229,10 +227,12 @@ proc getMetadataForNetwork*(networkName: string): Eth2NetworkMetadata =
|
||||
metadata.genesisData = readFile(metadata.genesisDataPath)
|
||||
return metadata
|
||||
|
||||
proc getRuntimePresetForNetwork*(eth2Network: Option[string]): RuntimePreset =
|
||||
proc getRuntimePresetForNetwork*(
|
||||
eth2Network: Option[string]): RuntimePreset {.raises: [Defect, IOError].} =
|
||||
if eth2Network.isSome:
|
||||
return getMetadataForNetwork(eth2Network.get).runtimePreset
|
||||
return defaultRuntimePreset
|
||||
|
||||
proc extractGenesisValidatorRootFromSnapshop*(snapshot: string): Eth2Digest =
|
||||
proc extractGenesisValidatorRootFromSnapshop*(
|
||||
snapshot: string): Eth2Digest {.raises: [Defect, IOError, SszError].} =
|
||||
sszMount(snapshot, BeaconState).genesis_validators_root[]
|
||||
|
Loading…
x
Reference in New Issue
Block a user