Skip to content

Commit

Permalink
zcash_client_backend: Use BTreeMap instead of HashMap for mem_wal…
Browse files Browse the repository at this point in the history
…let nullifier maps.
  • Loading branch information
nuttycom committed Mar 20, 2024
1 parent d013322 commit 9926057
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -124,5 +124,5 @@ codegen-units = 1
[patch.crates-io]
orchard = { git = "https://github.com/zcash/orchard", rev = "33474bdbfd7268e1f84718078d47f63d01a879d5" }
incrementalmerkletree = { git = "https://github.com/zcash/incrementalmerkletree", rev = "e1a7a80212c22e5a8912d05860f7eb6899c56a7c" }
sapling = { git = "https://github.com/zcash/sapling-crypto", package = "sapling-crypto", rev = "22412ae07644813253feb064d1692b0823242853" }
sapling = { git = "https://github.com/nuttycom/sapling-crypto", package = "sapling-crypto", rev = "827534329f3ff61f9212f7933ed1688fa04e987c" }
shardtree = { git = "https://github.com/zcash/incrementalmerkletree", rev = "e1a7a80212c22e5a8912d05860f7eb6899c56a7c" }
4 changes: 2 additions & 2 deletions zcash_client_backend/src/data_api/mem_wallet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@ pub struct MemoryWalletDb {
accounts: BTreeMap<u32, MemoryWalletAccount>,
blocks: BTreeMap<BlockHeight, MemoryWalletBlock>,
tx_idx: HashMap<TxId, BlockHeight>,
sapling_spends: HashMap<sapling::Nullifier, (TxId, bool)>,
sapling_spends: BTreeMap<sapling::Nullifier, (TxId, bool)>,
#[cfg(feature = "orchard")]
orchard_spends: HashMap<orchard::note::Nullifier, (TxId, bool)>,
orchard_spends: BTreeMap<orchard::note::Nullifier, (TxId, bool)>,
sapling_tree: ShardTree<
MemoryShardStore<sapling::Node, BlockHeight>,
{ SAPLING_SHARD_HEIGHT * 2 },
Expand Down

0 comments on commit 9926057

Please sign in to comment.