-
-
Notifications
You must be signed in to change notification settings - Fork 663
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: market bitvise colision (#3257)
This fixes an issue in the market system where the `offer.counter` value experienced collisions due to the use of a bitwise AND operation with a 16-bit mask (`& 0xFFFF`). When the `id` value exceeded multiples of 65,536 (e.g., 65,536, 131,072), the result would reset to `0`, causing incorrect behavior. The fix introduces a transformation using the XOR operator (`^0xABCDEF`) before applying the mask to distribute the values more uniformly and avoid collisions.
- Loading branch information
Showing
1 changed file
with
5 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters