From ea0e6f8c29b88dbbc423425504ab59f996d3418c Mon Sep 17 00:00:00 2001 From: Keyvan Khademi Date: Wed, 11 Sep 2024 07:45:46 -0700 Subject: [PATCH] feat: return delegator reward in advance delegation record instruction (#531) --- staking/programs/integrity-pool/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/staking/programs/integrity-pool/src/lib.rs b/staking/programs/integrity-pool/src/lib.rs index 30d2a39b..829cb145 100644 --- a/staking/programs/integrity-pool/src/lib.rs +++ b/staking/programs/integrity-pool/src/lib.rs @@ -301,7 +301,7 @@ pub mod integrity_pool { Ok(()) } - pub fn advance_delegation_record(ctx: Context) -> Result<()> { + pub fn advance_delegation_record(ctx: Context) -> Result { 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; @@ -374,7 +374,7 @@ pub mod integrity_pool { } delegation_record.advance(get_current_epoch()?)?; - Ok(()) + Ok(delegator_reward) } pub fn create_slash_event(