Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
str4d authored Mar 1, 2024
1 parent 5fd17a7 commit bb4f00b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 12 deletions.
14 changes: 5 additions & 9 deletions zcash_client_backend/src/data_api.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//! Utilities for Zcash wallet construction
//! =======================================
//! # Utilities for Zcash wallet construction
//!
//! This module defines a set of APIs for wallet data persistence, and provides a suite of methods
//! based upon these APIs that can be used to implement a fully functional Zcash wallet. At
Expand All @@ -8,8 +7,7 @@
//! [ZIP 307](https://zips.z.cash/zip-0307) but they may be generalized to full-block use cases in
//! the future.
//!
//! Important Concepts
//! ------------------
//! ## Important Concepts
//!
//! There are several important operations that a Zcash wallet must perform that distinguish Zcash
//! wallet design from wallets for other cryptocurrencies.
Expand All @@ -19,7 +17,7 @@
//! of spending keys, and spending keys must be provided by the caller in order to perform
//! transaction creation operations.
//! * Blockchain Scanning: A Zcash wallet must download and trial-decrypt each transaction on the
//! Zcash blockchain using one or more Viewing Keyw in order to find new shielded transaction
//! Zcash blockchain using one or more Viewing Keys in order to find new shielded transaction
//! outputs (generally termed "notes") belonging to the wallet. The primary entrypoint for this
//! functionality is the [`scan_cached_blocks`] method. See the [`chain`] module for additional
//! details.
Expand All @@ -30,8 +28,7 @@
//! * Transaction Construction: The [`wallet`] module provides functions for creating Zcash
//! transactions that spend funds belonging to the wallet.
//!
//! Core Traits
//! -----------
//! ## Core Traits
//!
//! The utility functions described above depend upon four important traits defined in this
//! module, which between them encompass the data storage requirements of a light wallet.
Expand All @@ -40,8 +37,7 @@
//! will include an implementation of all four of these traits. See the [`zcash_client_sqlite`]
//! crate for a complete example of the implementation of these traits.
//!
//! Accounts
//! --------
//! ## Accounts
//!
//! The operation of the [`InputSource`], [`WalletRead`] and [`WalletWrite`] traits is built around
//! the concept of a wallet having one or more accounts, with a unique `AccountId` for each
Expand Down
1 change: 1 addition & 0 deletions zcash_client_backend/src/data_api/scanning.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
//! Common types used for managing a queue of scanning ranges.

use std::fmt;
use std::ops::Range;

Expand Down
6 changes: 3 additions & 3 deletions zcash_client_backend/src/data_api/wallet.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//! Functions for creating Zcash transactions that spend funds belonging to the wallet
//! ==================================================================================
//! # Functions for creating Zcash transactions that spend funds belonging to the wallet
//!
//! This module contains several different ways of creating Zcash transactions. This module is
//! designed around the idea that a Zcash wallet holds its funds in notes in either the `orchard`
Expand All @@ -10,7 +9,7 @@
//! The important high-level operations provided by this module are [`propose_transfer`],
//! [`propose_shielding`], and [`create_proposed_transactions`].
//!
//! [`propose_transfer`] takes a [`TransactionRequest`] object and selects inputs notes and
//! [`propose_transfer`] takes a [`TransactionRequest`] object, selects inputs notes and
//! computes the fees required to satisfy that request, and returns a [`Proposal`] object that
//! describes the transaction to be made.
//!
Expand All @@ -28,6 +27,7 @@
//! [`TransactionRequest`]: crate::zip321::TransactionRequest
//! [`propose_transfer`]: crate::data_api::wallet::propose_transfer
//! [`propose_shielding`]: crate::data_api::wallet::propose_shielding

use nonempty::NonEmpty;
use rand_core::OsRng;
use sapling::{
Expand Down

0 comments on commit bb4f00b

Please sign in to comment.