From 9bb8d5f0e0968f5302319a5cc7d522f6b327fda7 Mon Sep 17 00:00:00 2001 From: RafilxTenfen Date: Fri, 20 Dec 2024 06:27:29 -0300 Subject: [PATCH] chore: rename btc dels to sats --- x/finality/keeper/power_dist_change.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/x/finality/keeper/power_dist_change.go b/x/finality/keeper/power_dist_change.go index b5e48891..581d415a 100644 --- a/x/finality/keeper/power_dist_change.go +++ b/x/finality/keeper/power_dist_change.go @@ -284,25 +284,25 @@ func (k Keeper) ProcessAllPowerDistUpdateEvents( } // process all new BTC delegations under this finality provider - if fpActiveBTCDels, ok := activedSatsByFpBtcPk[fpBTCPKHex]; ok { + if fpActiveSats, ok := activedSatsByFpBtcPk[fpBTCPKHex]; ok { // handle new BTC delegations for this finality provider - for _, activatedSats := range fpActiveBTCDels { + for _, activatedSats := range fpActiveSats { fp.AddBondedSats(activatedSats) } - // remove the finality provider entry in activeBTCDels map, so that - // after the for loop the rest entries in activeBTCDels belongs to new + // remove the finality provider entry in fpActiveSats map, so that + // after the for loop the rest entries in fpActiveSats belongs to new // finality providers with new BTC delegations delete(activedSatsByFpBtcPk, fpBTCPKHex) } // process all new unbonding BTC delegations under this finality provider - if fpUnbondedBTCDels, ok := unbondedSatsByFpBtcPk[fpBTCPKHex]; ok { + if fpUnbondedSats, ok := unbondedSatsByFpBtcPk[fpBTCPKHex]; ok { // handle unbonded delegations for this finality provider - for _, unbodedSats := range fpUnbondedBTCDels { + for _, unbodedSats := range fpUnbondedSats { fp.RemoveBondedSats(unbodedSats) } - // remove the finality provider entry in unbondedBTCDels map, so that - // after the for loop the rest entries in unbondedBTCDels belongs to new + // remove the finality provider entry in fpUnbondedSats map, so that + // after the for loop the rest entries in fpUnbondedSats belongs to new // finality providers that might have btc delegations entries // that activated and unbonded in the same slice of events delete(unbondedSatsByFpBtcPk, fpBTCPKHex)