Skip to content

Commit d3782ba

Browse files
authored
feat: allow Deneb fork version in gossipsub (#776)
1 parent b6a5c18 commit d3782ba

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

lib/chain_spec/chain_spec.ex

+4-7
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,10 @@ defmodule ChainSpec do
99
def get_preset, do: get_config().get("PRESET_BASE") |> String.to_atom()
1010

1111
def get_fork_version_for_epoch(epoch) do
12-
capella_version = get("CAPELLA_FORK_VERSION")
13-
cappella_epoch = get("CAPELLA_FORK_EPOCH")
14-
15-
if epoch >= cappella_epoch do
16-
capella_version
17-
else
18-
raise "Forks before Capella are not supported"
12+
cond do
13+
epoch >= get("DENEB_FORK_EPOCH") -> get("DENEB_FORK_VERSION")
14+
epoch >= get("CAPELLA_FORK_EPOCH") -> get("CAPELLA_FORK_VERSION")
15+
true -> raise "Forks before Capella are not supported"
1916
end
2017
end
2118

0 commit comments

Comments
 (0)