Skip to content

Commit

Permalink
Use head state in validator API #8
Browse files Browse the repository at this point in the history
Computing the preprocessed state fails when the app is freshly started and has too many empty slots,
preventing it from signing voluntary exits. This necessitates changing the signing process to use the head instead
of the preprocessed state.
  • Loading branch information
Tumas committed Apr 2, 2024
1 parent 6938577 commit 3cfefca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion validator/src/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,7 @@ async fn keymanager_create_voluntary_exit<P: Preset, W: Wait>(
EthPath(pubkey): EthPath<PublicKeyBytes>,
EthQuery(query): EthQuery<CreateVoluntaryExitQuery>,
) -> Result<EthResponse<SignedVoluntaryExit>, Error> {
let state = controller.preprocessed_state_at_current_slot()?;
let state = controller.head_state().value;

let epoch = query
.epoch
Expand Down

0 comments on commit 3cfefca

Please sign in to comment.