From 1fde0d12ea868d1413110298455da8970683484c Mon Sep 17 00:00:00 2001 From: Noah Prince Date: Fri, 10 Jan 2025 08:30:55 -0800 Subject: [PATCH] Fix calculate utility score to set up bump seed --- .../src/instructions/calculate_utility_score_v0.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/programs/helium-sub-daos/src/instructions/calculate_utility_score_v0.rs b/programs/helium-sub-daos/src/instructions/calculate_utility_score_v0.rs index b0a049d80..e2b3f1b58 100644 --- a/programs/helium-sub-daos/src/instructions/calculate_utility_score_v0.rs +++ b/programs/helium-sub-daos/src/instructions/calculate_utility_score_v0.rs @@ -142,6 +142,10 @@ pub fn handler( ctx.accounts.sub_dao_epoch_info.sub_dao = ctx.accounts.sub_dao.key(); ctx.accounts.sub_dao_epoch_info.bump_seed = *ctx.bumps.get("sub_dao_epoch_info").unwrap(); ctx.accounts.sub_dao_epoch_info.initialized = true; + ctx.accounts.prev_sub_dao_epoch_info.sub_dao = ctx.accounts.sub_dao.key(); + ctx.accounts.prev_sub_dao_epoch_info.bump_seed = + *ctx.bumps.get("prev_sub_dao_epoch_info").unwrap(); + ctx.accounts.prev_sub_dao_epoch_info.epoch = args.epoch - 1; ctx.accounts.dao_epoch_info.bump_seed = *ctx.bumps.get("dao_epoch_info").unwrap(); // Calculate utility score