-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The shard_seeder tool (in opencbdc-tx) computes shard range as 256/#shards, i.e., rounds down the range. This script computes it as 255/#shards +1, i.e., rounds it up. This doesn't matter if num shards is a power of 2, but for other values, the tool and script differ, causing errors in seed generation. The quick fix in this commit is to calculate the range by rounding down, as the tool does, and to ensure that the last range is extended, if needed, to the 1-byte max or 255. Signed-off-by: Ram Darbha <[email protected]>
- Loading branch information
1 parent
02fa6fc
commit 4be5efe
Showing
1 changed file
with
26 additions
and
1 deletion.
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