Skip to content

Commit

Permalink
overrides repeated credentials
Browse files Browse the repository at this point in the history
  • Loading branch information
avilagaston9 committed Aug 10, 2024
1 parent 01a7371 commit 6056eaa
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion lib/key_store_api/controllers/v1/key_store_controller.ex
Original file line number Diff line number Diff line change
Expand Up @@ -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)

%{
Expand Down
1 change: 0 additions & 1 deletion lib/libp2p_port.ex
Original file line number Diff line number Diff line change
Expand Up @@ -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})

Expand Down

0 comments on commit 6056eaa

Please sign in to comment.