From 91249f25223b0b305c3a291c7241365d667f61cf Mon Sep 17 00:00:00 2001 From: nicolas <48695862+merklefruit@users.noreply.github.com> Date: Thu, 17 Oct 2024 10:27:08 +0200 Subject: [PATCH] feat: delegations/revocations update --- bolt-boost/src/server.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/bolt-boost/src/server.rs b/bolt-boost/src/server.rs index 332e24ef..0418073c 100644 --- a/bolt-boost/src/server.rs +++ b/bolt-boost/src/server.rs @@ -145,10 +145,10 @@ async fn submit_constraints( #[tracing::instrument(skip_all)] async fn delegate( State(state): State>, - Json(delegation): Json, + Json(delegations): Json>, ) -> Result { - info!(delegatee = %delegation.message.delegatee_pubkey, validator = %delegation.message.validator_pubkey, "Delegating signing rights"); - post_request(state, DELEGATE_PATH, &delegation).await?; + info!(count = %delegations.len(), "Delegating signing rights"); + post_request(state, DELEGATE_PATH, &delegations).await?; Ok(StatusCode::OK) } @@ -157,10 +157,10 @@ async fn delegate( #[tracing::instrument(skip_all)] async fn revoke( State(state): State>, - Json(revocation): Json, + Json(revocations): Json>, ) -> Result { - info!(delegatee = %revocation.message.delegatee_pubkey, validator = %revocation.message.validator_pubkey, "Revoking signing rights"); - post_request(state, REVOKE_PATH, &revocation).await?; + info!(count = %revocations.len(), "Revoking signing rights"); + post_request(state, REVOKE_PATH, &revocations).await?; Ok(StatusCode::OK) }