mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-01-10 20:54:33 +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,
|
void Function(int countFetched, int totalCount)? progressUpdated,
|
||||||
) async {
|
) async {
|
||||||
await _setLocks[network]!.protect(() 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(
|
final prevMeta = await FiroCacheCoordinator.getLatestSetInfoForGroupId(
|
||||||
groupId,
|
groupId,
|
||||||
network,
|
network,
|
||||||
|
@ -128,7 +129,7 @@ abstract class FiroCacheCoordinator {
|
||||||
final start = (i * sectorSize);
|
final start = (i * sectorSize);
|
||||||
final data = await client.getSparkAnonymitySetBySector(
|
final data = await client.getSparkAnonymitySetBySector(
|
||||||
coinGroupId: groupId,
|
coinGroupId: groupId,
|
||||||
latestBlock: meta.blockHash.toHexReversedFromBase64,
|
latestBlock: meta.blockHash,
|
||||||
startIndex: start,
|
startIndex: start,
|
||||||
endIndex: start + sectorSize,
|
endIndex: start + sectorSize,
|
||||||
);
|
);
|
||||||
|
@ -140,7 +141,7 @@ abstract class FiroCacheCoordinator {
|
||||||
if (remainder > 0) {
|
if (remainder > 0) {
|
||||||
final data = await client.getSparkAnonymitySetBySector(
|
final data = await client.getSparkAnonymitySetBySector(
|
||||||
coinGroupId: groupId,
|
coinGroupId: groupId,
|
||||||
latestBlock: meta.blockHash.toHexReversedFromBase64,
|
latestBlock: meta.blockHash,
|
||||||
startIndex: numberOfCoinsToFetch - remainder,
|
startIndex: numberOfCoinsToFetch - remainder,
|
||||||
endIndex: numberOfCoinsToFetch,
|
endIndex: numberOfCoinsToFetch,
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue