Skip to content

Commit

Permalink
feat(rpc-server): check withdrawal request minimal capacity
Browse files Browse the repository at this point in the history
  • Loading branch information
zeroqn committed Jun 28, 2022
1 parent 1b54ea0 commit 05a0cec
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions crates/rpc-server/src/registry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1046,6 +1046,13 @@ async fn submit_withdrawal_request(
data: None,
});
}
if let Err(err) = withdrawal_generator.verified_output(&withdrawal, &Default::default()) {
return Err(RpcError::Full {
code: INVALID_REQUEST,
message: err.to_string(),
data: None,
});
}
}

if let Err(err) = submit_tx.try_send(Request::Withdrawal(withdrawal)) {
Expand Down

0 comments on commit 05a0cec

Please sign in to comment.