Skip to content

Commit

Permalink
WIP: Create an in-memory wallet backend.
Browse files Browse the repository at this point in the history
  • Loading branch information
nuttycom committed Feb 22, 2024
1 parent 04343e1 commit 0cd1626
Show file tree
Hide file tree
Showing 4 changed files with 456 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ members = [

[workspace.package]
edition = "2021"
rust-version = "1.65"
rust-version = "1.69"
repository = "https://github.com/zcash/librustzcash"
license = "MIT OR Apache-2.0"
categories = ["cryptography::cryptocurrencies"]
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[toolchain]
channel = "1.65.0"
channel = "1.69.0"
components = [ "clippy", "rustfmt" ]
17 changes: 10 additions & 7 deletions zcash_client_backend/src/data_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ pub mod error;
pub mod scanning;
pub mod wallet;

#[cfg(any(test, feature = "test-dependencies"))]
pub mod mem_wallet;

/// The height of subtree roots in the Sapling note commitment tree.
///
/// This conforms to the structure of subtree data returned by
Expand Down Expand Up @@ -1247,13 +1250,6 @@ pub mod testing {
Ok(None)
}

fn get_target_and_anchor_heights(
&self,
_min_confirmations: NonZeroU32,
) -> Result<Option<(BlockHeight, BlockHeight)>, Self::Error> {
Ok(None)
}

fn block_metadata(
&self,
_height: BlockHeight,
Expand All @@ -1273,6 +1269,13 @@ pub mod testing {
Ok(vec![])
}

fn get_target_and_anchor_heights(
&self,
_min_confirmations: NonZeroU32,
) -> Result<Option<(BlockHeight, BlockHeight)>, Self::Error> {
Ok(None)
}

fn get_min_unspent_height(&self) -> Result<Option<BlockHeight>, Self::Error> {
Ok(None)
}
Expand Down
Loading

0 comments on commit 0cd1626

Please sign in to comment.