Commit Graph

1547 Commits

Author SHA1 Message Date
Kris Nuttycombe 4c2cda48e6 Clean up transactional API.
This API is still somewhat unsafe in that it doesn't inhibit nested
transactions, but it's better than it was.
2020-12-02 09:46:17 -07:00
Kris Nuttycombe cd2729bbd0 Move 'create_spend_to_address' to wallet backend.
This required changing a bit about the relationship between
database errors and wallet errors, and opens up the possibility
of now simplifying the error situation a bit.
2020-12-02 09:46:17 -07:00
Kris Nuttycombe e144015558 Reuse sent note insertion for wallet/transact. 2020-12-02 09:46:17 -07:00
Kris Nuttycombe 68737dd1dd Remove duplicate method. 2020-12-02 09:46:17 -07:00
Kris Nuttycombe 8de05f3429 Move transact.rs to wallet module. 2020-12-02 09:46:17 -07:00
Kris Nuttycombe 8967745c22 Push chain & wallet functionality down to child modules. 2020-12-02 09:46:17 -07:00
Kris Nuttycombe 22ef05239c Split init module into chain and wallet-related parts. 2020-12-02 09:46:17 -07:00
Kris Nuttycombe a181203179 Move related functions into the same modules. 2020-12-02 09:46:17 -07:00
Kris Nuttycombe eab2951c99 Move decrypt_and_store_transaction to zcash_client_backend 2020-12-02 09:46:17 -07:00
Kris Nuttycombe 0165ae7003 Minor renamings. 2020-12-02 09:46:17 -07:00
Kris Nuttycombe 746c4c9a00 Move scan_cached_blocks out of sqlite crate. 2020-12-02 09:46:17 -07:00
Kris Nuttycombe d16c124ffe Abstract over data access in scan_cached_blocks. 2020-12-02 09:46:17 -07:00
Kris Nuttycombe 06c1772692 Move traversal of cached blocks to CacheOps 2020-12-02 09:46:17 -07:00
Kris Nuttycombe 604294dd9f Factor out nullifier retrieval into data api. 2020-12-02 09:46:17 -07:00
Kris Nuttycombe ffd503134d Factor out witness retrieval from scan. 2020-12-02 09:46:17 -07:00
Kris Nuttycombe 499dcd2e6c Add the remainder of sqlite/query.rs functions to the data API. 2020-12-02 09:46:17 -07:00
Kris Nuttycombe 56e6091876 Factor out `get_commitment_tree` from scan. 2020-12-02 09:46:17 -07:00
Kris Nuttycombe d16c74725e Extract get_extended_full_viewing_keys function.
This required a bit of generalization of the data_api error types.
2020-12-02 09:46:17 -07:00
Kris Nuttycombe 3eec6f8faa Add get_balance, get_verified_balance to data api. 2020-12-02 09:46:17 -07:00
Kris Nuttycombe 70de11dd32 Add address retrieval. 2020-12-02 09:46:17 -07:00
Kris Nuttycombe b72251ee28 Add accounts table initialization. 2020-12-02 09:46:17 -07:00
Kris Nuttycombe 724fbac33a Add database initialization implementation. 2020-12-02 09:46:17 -07:00
Kris Nuttycombe f3f3512068 Move get_target_and_anchor_heights to data_api. 2020-12-02 09:46:17 -07:00
Kris Nuttycombe 9874abfd6c Implement chain validation & fix doctests. 2020-12-02 09:46:17 -07:00
Kris Nuttycombe a437df191e Initial skeleton of low-level database access API. 2020-12-02 09:46:17 -07:00
str4d 7ced7f3c56
Merge pull request #315 from gmale/zip-313-impl
ZIP 313 Implementation
2020-11-24 02:10:17 +00:00
Jack Grigg 936b399599 Fix remaining tests after default fee change 2020-11-24 01:50:47 +00:00
Kris Nuttycombe 1285ab0af2 Fix tests to account for modified default fees. 2020-11-24 01:24:19 +00:00
Kevin Gorham 53ebc378cc ZIP-313 change default fee amount. 2020-11-24 01:22:14 +00:00
str4d 97ef1592bb
Merge pull request #316 from nuttycom/sighash_components
Make the functions which produce the components of the sighash reusable.
2020-11-19 22:21:41 +00:00
Kris Nuttycombe f40174464a
Use slices as parameters rather than &Vec references.
Co-authored-by: str4d <thestr4d@gmail.com>
2020-11-19 14:49:24 -07:00
Kris Nuttycombe 517170652d Use github environment file instead of (deprecated) set-env 2020-11-19 14:48:12 -07:00
Kris Nuttycombe 726f02513d Make the functions which produce the components of the sighash reusable.
When implementing transaction nonmalleability, it will be useful
to have this already done.
2020-11-19 11:25:24 -07:00
ebfull baab9d3ca3
Merge pull request #313 from str4d/delint
Remove a bunch of lint
2020-11-02 13:48:08 -07:00
Jack Grigg 00307c8059 Fix various small lints 2020-10-30 14:10:35 +00:00
Jack Grigg be8bae71be Suppress clippy lints where we want the given behaviour 2020-10-30 14:10:35 +00:00
Jack Grigg 91796adcda Remove wrapping closures around mapping functions 2020-10-30 14:10:35 +00:00
Jack Grigg 025deda712 impl Default for T on types with T::new() 2020-10-30 14:10:35 +00:00
Jack Grigg 44cbc6cc6d Remove unnecessary references 2020-10-30 14:10:35 +00:00
Jack Grigg 88474c71c7 Simplify expressions 2020-10-30 13:51:40 +00:00
Jack Grigg 01f0d7dcda Pass slices instead of &Vec 2020-10-30 13:51:40 +00:00
Jack Grigg 0cb51f963c Remove unnecessary clones 2020-10-30 13:51:40 +00:00
Jack Grigg bc9ca20d56 Make use of assignment operators 2020-10-30 13:26:36 +00:00
Jack Grigg 890648df4d Use !x.is_empty() instead of x.len() > 0 2020-10-30 13:25:08 +00:00
Jack Grigg 0bbcd8c408 Remove unnecessary imports 2020-10-30 13:22:46 +00:00
str4d 2a6955102a
Merge pull request #312 from adityapk00/pubconstants
Export notesize constants
2020-10-29 20:23:29 +00:00
ebfull 6f039a3069
Merge pull request #310 from str4d/update-ci
Update Actions CI with improved workflow
2020-10-27 13:52:37 -06:00
Jack Grigg 8593a067ca Force Clippy nightly lints to all warn, never error 2020-10-27 17:20:00 +00:00
Aditya Kulkarni 70ecd6b2d8 Export notesize constants 2020-10-26 11:31:22 -07:00
str4d ee15eea3ee
Merge pull request #311 from str4d/zcash_client_sqlite-0.2.1
zcash_client_sqlite: Read rcm correctly from data DB after Canopy
2020-10-24 12:37:32 +01:00