This causes lightwalletd to discard cached blocks at the given height
and beyond. This in turn causes it to re-fetch those blocks from zcashd.
It's similar to --redownload, except that option discards all blocks
(equivalent to --sync-from-height 0, but the existing --redownload is
retained for compatibility).
This is mostly intended for testing. It's sometimes useful to force the
node to (re)sync some recent blocks, but redownloading all of them takes
around an hour.
This commit is based on adityapk00 streaming mempool interface but
avoids using goroutines, which are difficult to reason about.
Co-authored-by: Aditya Kulkarni <adityapk@gmail.com>
* Prices API
* Add current prices
* Historical prices persist
* Add mutexs
* multiple providers
* Handle startup
* Edge case where historical price is requested for current
* fix median edge case
* Don't return too old last price
* bug fixes
* price metrics and logging
* warnings
Add a new darksidewallet gRPC to add a utxo that can be returned by the
production GetAddressUtxos, for example:
grpcurl -plaintext -d '{"address":"t1g1HQJuwDoStGrYYLj8VhLu1J5igd8TNXV","txid":"1zjB42Z7FtwRZOBNMlTubCgx9l3dsZSqXxmWpuZXJto=","script": "dqkU8saQsCVS4mNwcByoGCtfOaHFaCiIrA==","valueZat": "3010000","height": "686773"}' localhost:9067 cash.z.wallet.sdk.rpc.DarksideStreamer/AddAddressUtxo
Then the following returns this entry:
grpcurl -plaintext -d '{"startHeight":0,"maxEntries":2,"addresses":["t1g1HQJuwDoStGrYYLj8VhLu1J5igd8TNXV"]}' localhost:9067 cash.z.wallet.sdk.rpc.CompactTxStreamer/GetAddressUtxos
You can also clear the list of entries:
grpcurl -plaintext localhost:9067 cash.z.wallet.sdk.rpc.DarksideStreamer/ClearAddressUtxo
I installed the latest toolchain according to:
https://grpc.io/docs/languages/go/quickstart/
I updated the protoc command line arguments in Makefile based on
that quickstart guide, then I ran: make update-grpc
This has set the tool version (which you can see at the top of
any .pb.go file) to:
protoc-gen-go v1.25.0
protoc v3.14.0
- renamed GetAddressBalance to GetAddressBalanceStream
- changed GetAddressBalance argument to repeated (string) rather than
streaming
- rename balance field to valueZat (consistent with zcashd)