Skip to content

Commit

Permalink
feat: return delegator reward in advance delegation record instruction (
Browse files Browse the repository at this point in the history
  • Loading branch information
keyvankhademi authored Sep 11, 2024
1 parent 88fda82 commit ea0e6f8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions staking/programs/integrity-pool/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ pub mod integrity_pool {
Ok(())
}

pub fn advance_delegation_record(ctx: Context<AdvanceDelegationRecord>) -> Result<()> {
pub fn advance_delegation_record(ctx: Context<AdvanceDelegationRecord>) -> Result<frac64> {
let delegation_record = &mut ctx.accounts.delegation_record;
let pool_data = &mut ctx.accounts.pool_data.load_mut()?;
let pool_config = &ctx.accounts.pool_config;
Expand Down Expand Up @@ -374,7 +374,7 @@ pub mod integrity_pool {
}

delegation_record.advance(get_current_epoch()?)?;
Ok(())
Ok(delegator_reward)
}

pub fn create_slash_event(
Expand Down

0 comments on commit ea0e6f8

Please sign in to comment.