File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed
Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -837,10 +837,10 @@ func (k Keeper) SetMinimumPowerInTopN(
837837) {
838838 store := ctx .KVStore (k .storeKey )
839839
840- powerBytes := make ([]byte , 8 )
841- binary .BigEndian .PutUint64 (powerBytes , uint64 (power ))
840+ buf := make ([]byte , 8 )
841+ binary .BigEndian .PutUint64 (buf , uint64 (power ))
842842
843- store .Set (types .MinimumPowerInTopNKey (chainID ), powerBytes )
843+ store .Set (types .MinimumPowerInTopNKey (chainID ), buf )
844844}
845845
846846// GetMinimumPowerInTopN returns the minimum power required for a validator to be in the top N
@@ -850,12 +850,11 @@ func (k Keeper) GetMinimumPowerInTopN(
850850 chainID string ,
851851) (int64 , bool ) {
852852 store := ctx .KVStore (k .storeKey )
853- bz := store .Get (types .MinimumPowerInTopNKey (chainID ))
854- if bz == nil {
853+ buf := store .Get (types .MinimumPowerInTopNKey (chainID ))
854+ if buf == nil {
855855 return 0 , false
856856 }
857-
858- return int64 (binary .BigEndian .Uint64 (bz )), true
857+ return int64 (binary .BigEndian .Uint64 (buf )), true
859858}
860859
861860// DeleteMinimumPowerInTopN removes the minimum power required for a validator to be in the top N
You can’t perform that action at this time.
0 commit comments