mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-12-23 03:49:22 +00:00
fix: update hash format and use better sector/page size
This commit is contained in:
parent
4439ad70d2
commit
f97ef50978
1 changed files with 4 additions and 3 deletions
|
@ -95,7 +95,8 @@ abstract class FiroCacheCoordinator {
|
|||
void Function(int countFetched, int totalCount)? progressUpdated,
|
||||
) async {
|
||||
await _setLocks[network]!.protect(() async {
|
||||
const sectorSize = 12000; // TODO adjust this?
|
||||
const sectorSize =
|
||||
1500; // chosen as a somewhat decent value. Could be changed in the future if wanted/needed
|
||||
final prevMeta = await FiroCacheCoordinator.getLatestSetInfoForGroupId(
|
||||
groupId,
|
||||
network,
|
||||
|
@ -128,7 +129,7 @@ abstract class FiroCacheCoordinator {
|
|||
final start = (i * sectorSize);
|
||||
final data = await client.getSparkAnonymitySetBySector(
|
||||
coinGroupId: groupId,
|
||||
latestBlock: meta.blockHash.toHexReversedFromBase64,
|
||||
latestBlock: meta.blockHash,
|
||||
startIndex: start,
|
||||
endIndex: start + sectorSize,
|
||||
);
|
||||
|
@ -140,7 +141,7 @@ abstract class FiroCacheCoordinator {
|
|||
if (remainder > 0) {
|
||||
final data = await client.getSparkAnonymitySetBySector(
|
||||
coinGroupId: groupId,
|
||||
latestBlock: meta.blockHash.toHexReversedFromBase64,
|
||||
latestBlock: meta.blockHash,
|
||||
startIndex: numberOfCoinsToFetch - remainder,
|
||||
endIndex: numberOfCoinsToFetch,
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue