Commit Graph

1757 Commits

Author SHA1 Message Date
Kris Nuttycombe ee0e059eb3 Add coin_type to consensus parameters. 2020-12-02 09:46:17 -07:00
Kris Nuttycombe 897a70dd9e Simplify block source & clean up chain validation. 2020-12-02 09:46:17 -07:00
Kris Nuttycombe 8a215d67fe Improve wallet "database" trait names. 2020-12-02 09:46:17 -07:00
Kris Nuttycombe b2cc240454 Do not require wallet database for chain scan. 2020-12-02 09:46:17 -07:00
Kris Nuttycombe e6de7c07f0 Use <module_name>.rs instead of <module_name>/mod.rs 2020-12-02 09:46:17 -07:00
Kris Nuttycombe f742895118 Fix test/doctest errors. 2020-12-02 09:46:17 -07:00
Kris Nuttycombe 2e2f34b033 Use named_params macro for query_and_then_named (less error-prone) 2020-12-02 09:46:17 -07:00
Kris Nuttycombe 25b5fc965f Fix broken empty_database_has_no_balance test 2020-12-02 09:46:17 -07:00
Kris Nuttycombe c60b9d3ece Remove database initialization calls from common API. 2020-12-02 09:46:17 -07:00
Kris Nuttycombe 903ef58ec6 Fix transactionality in rewind_to_height 2020-12-02 09:46:17 -07:00
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