diff --git a/lib/key_store_api/controllers/v1/key_store_controller.ex b/lib/key_store_api/controllers/v1/key_store_controller.ex index dec1bbe49..ce91e1dc2 100644 --- a/lib/key_store_api/controllers/v1/key_store_controller.ex +++ b/lib/key_store_api/controllers/v1/key_store_controller.ex @@ -59,9 +59,9 @@ defmodule KeyStoreApi.V1.KeyStoreController do base_name = keystore.pubkey |> Utils.hex_encode() + # This overrides any existing credential with the same pubkey. File.write!(get_keystore_file_path(base_name), keystore_str) File.write!(get_keystore_pass_file_path(base_name), password_str) - Libp2pPort.add_validator(keystore) %{ diff --git a/lib/libp2p_port.ex b/lib/libp2p_port.ex index 919b41baf..18a2baf34 100644 --- a/lib/libp2p_port.ex +++ b/lib/libp2p_port.ex @@ -563,7 +563,6 @@ defmodule LambdaEthereumConsensus.Libp2pPort do @impl GenServer def handle_call({:add_validator, keystore}, _from, %{validators: validators} = state) do # TODO (#1263): handle 0 validators - # TODO (#1264): handle repeated validators first_validator = validators |> Map.values() |> List.first() validator = Validator.new({first_validator.slot, first_validator.root, keystore})