From a926b6c2679cea8f6c3eae92ebaa04613b43c1a9 Mon Sep 17 00:00:00 2001 From: n3wbie Date: Mon, 16 Dec 2024 12:36:02 +0900 Subject: [PATCH] chore: rename --- pool/tick_bitmap.gno | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pool/tick_bitmap.gno b/pool/tick_bitmap.gno index 845e9ed2..4c4e9a75 100644 --- a/pool/tick_bitmap.gno +++ b/pool/tick_bitmap.gno @@ -91,14 +91,14 @@ func getWordAndBitPos(tick int32, lte bool) (int16, uint8) { // The function constructs a bitmask with a shift depending on the bit position and the boolean value. // It either returns the mask or its negation, based on the value of 'lte' (swap direction). func getMaskBit(bitPos uint, lte bool) *u256.Uint { - // Shift the number 1 to the left by (bitPos + bitPosAdjust) positions. + // Shift the number 1 to the left by (bitPos + bitOffset) positions. // If lte is true, the shift will be bitPos + 1; if false, it will be just bitPos. - var bitPosAdjust uint + var bitOffset uint if lte { - bitPosAdjust = 1 + bitOffset = 1 } - shifted := new(u256.Uint).Lsh(u256.One(), bitPos+bitPosAdjust) + shifted := new(u256.Uint).Lsh(u256.One(), bitPos+bitOffset) // Subtract 1 from the shifted value to create a mask. mask := new(u256.Uint).Sub(shifted, u256.One())