- Structures that represent transactions DB views are newly define.
- New structures are:
- TransactionNG.Overview
- TransactionNG.Received
- TransactionNG.Sent
- `TransactionNG` is used as temporary name. `Transaction` is existing
structure in the code. `TransactionNG` will be eventually renamed to
`Transaction` once current `Transaction` is removed from code.
- New methods that are using new structures are added to
`TransactionRepository`. Those are slightly changed compared to
predecessors. Those are now little bit simpler to use.
Address review comments
- Previously we had one range for each sync which was used for each
phase of sync process. Newly there is separate range for each phase of
the sync process.
- I added `InternalSyncProgress` utility. This utility tracks progress
of some phases. And it is able to compute right ranges which should be
used for syncing.
- Some unused download code from `CompactBlockProcessor` is removed.
Fix tests
Address review comments
- Rebase to master
- Update how range for `processBatchFinished()` is computed.
- Refactor `InternalSyncProgress`
- Add tests for `InternalSyncProgress`
Address review comments
Change how latest downloaded block is tracked
- Cache DB is no longer used to track which block was downloaded as
latest. `InternalSyncProgress` is used to do that.
- Thanks to that #660 is fixed. And cache DB can be completely removed
after sync process.
- Added sleep(1) to some darkside tests when latest block height is set.
Otherwise lightwalletd in darkside mode doesn't have time to setup and
tests are flaky.
Fix TransactionEnhancementTests.testBasicEnhancement test
There's a problem withstanding:
````
▿ RustWeldingError
▿ genericError : 1 element
- message : "Error while fetching transparent balances for AccountId(0): Invalid column type Null at index: 0, name: address"
````
Which is fixed by commit `d0297bff0cdaaff42ad26f3be5bc261f6c828e8f` of "https://github.com/zcash/librustzcash".
nil-coalesce thrown errors on test so it reaches the end.
Make balance calls throwing to show underlying errors but nil-coalesce in non-throwing APIs
Add missing fulfill() calls
Add changelog entry
document and handle errors on getting shielded balance before
attempting to download sapling parameters.
- sync process enhanced to try to download sapling params if needed
- tests fixed
- failing import Crypto -> import CryptoKit
- download params only if there are sapling funds
This provides a method for clients to handle UI for text memo
limit correctly handling memos that are visibly fit within the
capacity defined in ZIP-302 but when encoded into UTF-8 bytes
their size exceeds such limit.
Closes#639
It's not good practice to make internal combine subjects accessible from
outside of SDK. So `lastState` is changed from `CurrentValueSubject` to
`Publisher`. This doesn't have any effect on public API. It just makes
SDK safer.
Closes#616
- Added small helper `NotificationSender` which is used to send
notifications.
- No notificaiton is sent on main thread.
- Change how `status` is stored and update in `SDKSynchronizer`. It is
now protected by lock. Before this wasn't needed because status was
updated from main thread everywhere.
- `SyncBlocksViewController` in the sample app now uses
`SDKSynchronizer` instead of `CompactBlockProcessor` directly.
Closes#488
- When sync process is finished cache DB is removed from disk.
- Latest downloaded block is preserved becuase it's required to computes
in which phase to resume sync process.
- `SDKSynchronizer.latestDownloadedHeight` public API is removed
it makes no longer sense. This API was reading from cache DB.
state for this synchronizer.
also reports the SychronizerState on synchonizerStarted notification.
Add tests that verify the state being reported properly
Fix `BlockBatchValidationTests`
Closes#614
fixes travis ci
Removed `setStartHeight` function
I’m going back in time and this setHeight is not something we are using anywhere else than in the prepare function. This comes from the times we had `initialize(seed:birthday) and we don’t have that anymore
See diff 246d10edaa (diff-414771774e10bc81260094ffcdc7b310a3be48758b2abd2bfae831c83912c02c)
The `func setStartHeight(_ startHeight: BlockHeight)` function assumes that
there might not be a wallet birthday set up or that it might be changed
in-flight which are things that are no longer happening.
remove test warning
Fix test compiler error
Closes#619
- When computing next action in `NextStateHelper.nextStateAsync` now
scanning state is also taken into consideration.
- When processing blocks download phase is skipped when it's detected
that everything is already downloaded.