Skip to content

Commit

Permalink
REVERT: Use total_security (#73)
Browse files Browse the repository at this point in the history
Reverts the changes of PR #46 ( actually merged in PR #47 )

This issue this meant to address, upon further investigation, was not an
issue.
  • Loading branch information
coachchucksol authored Jan 26, 2025
1 parent b725632 commit 3ef54e4
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions core/src/epoch_snapshot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -525,10 +525,9 @@ impl OperatorSnapshot {
weight_table: &WeightTable,
st_mint: &Pubkey,
) -> Result<u128, ProgramError> {
// With using `delegation_state.total_security()` there is a thin margin
// where stake can be double counted. For this reason, we'll use the
// delegation_state.staked_amount() instead.
let total_security = vault_operator_delegation.delegation_state.staked_amount();
let total_security = vault_operator_delegation
.delegation_state
.total_security()?;

let precise_total_security = PreciseNumber::new(total_security as u128)
.ok_or(TipRouterError::NewPreciseNumberError)?;
Expand Down

0 comments on commit 3ef54e4

Please sign in to comment.