replace unmantained multiset with mset (#3595)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
parent
b7b62af2f2
commit
f6edcc4c92
|
|
@ -2378,9 +2378,10 @@ dependencies = [
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "multiset"
|
name = "mset"
|
||||||
version = "0.0.5"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/jmitchell/multiset?rev=91ef8550b518f75ae87ae0d8771150f259fd34d5#91ef8550b518f75ae87ae0d8771150f259fd34d5"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "05d1cf737c48148e9956a9ea00710258dcf2a7afdedc34a2c672a44866f618dc"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "native-tls"
|
name = "native-tls"
|
||||||
|
|
@ -5617,7 +5618,7 @@ dependencies = [
|
||||||
"jubjub",
|
"jubjub",
|
||||||
"lazy_static",
|
"lazy_static",
|
||||||
"metrics",
|
"metrics",
|
||||||
"multiset",
|
"mset",
|
||||||
"once_cell",
|
"once_cell",
|
||||||
"proptest",
|
"proptest",
|
||||||
"proptest-derive",
|
"proptest-derive",
|
||||||
|
|
|
||||||
|
|
@ -93,9 +93,6 @@ allow-registry = ["https://github.com/rust-lang/crates.io-index"]
|
||||||
allow-git = [
|
allow-git = [
|
||||||
# ticket #2982: librustzcash and orchard git versions
|
# ticket #2982: librustzcash and orchard git versions
|
||||||
"https://github.com/str4d/redjubjub",
|
"https://github.com/str4d/redjubjub",
|
||||||
|
|
||||||
# ticket #2523: replace unmaintained multiset
|
|
||||||
"https://github.com/jmitchell/multiset",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[sources.allow-org]
|
[sources.allow-org]
|
||||||
|
|
|
||||||
|
|
@ -17,12 +17,7 @@ futures = "0.3.21"
|
||||||
hex = "0.4.3"
|
hex = "0.4.3"
|
||||||
lazy_static = "1.4.0"
|
lazy_static = "1.4.0"
|
||||||
metrics = "0.17.1"
|
metrics = "0.17.1"
|
||||||
# TODO: this crate is not maintained anymore. Replace it?
|
mset = "0.1.0"
|
||||||
# https://github.com/ZcashFoundation/zebra/issues/2523
|
|
||||||
#
|
|
||||||
# Pinned to a commit which includes bug fix https://github.com/jmitchell/multiset/pull/21
|
|
||||||
# The fix should be included in multiset 0.0.6.
|
|
||||||
multiset = { git = "https://github.com/jmitchell/multiset", rev = "91ef8550b518f75ae87ae0d8771150f259fd34d5" }
|
|
||||||
proptest = { version = "0.10.1", optional = true }
|
proptest = { version = "0.10.1", optional = true }
|
||||||
proptest-derive = { version = "0.3.0", optional = true }
|
proptest-derive = { version = "0.3.0", optional = true }
|
||||||
regex = "1"
|
regex = "1"
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ use std::{
|
||||||
ops::Deref,
|
ops::Deref,
|
||||||
};
|
};
|
||||||
|
|
||||||
use multiset::HashMultiSet;
|
use mset::MultiSet;
|
||||||
use tracing::instrument;
|
use tracing::instrument;
|
||||||
|
|
||||||
use zebra_chain::{
|
use zebra_chain::{
|
||||||
|
|
@ -60,7 +60,7 @@ pub struct Chain {
|
||||||
pub(crate) history_tree: HistoryTree,
|
pub(crate) history_tree: HistoryTree,
|
||||||
|
|
||||||
/// The Sprout anchors created by `blocks`.
|
/// The Sprout anchors created by `blocks`.
|
||||||
pub(crate) sprout_anchors: HashMultiSet<sprout::tree::Root>,
|
pub(crate) sprout_anchors: MultiSet<sprout::tree::Root>,
|
||||||
/// The Sprout anchors created by each block in `blocks`.
|
/// The Sprout anchors created by each block in `blocks`.
|
||||||
pub(crate) sprout_anchors_by_height: BTreeMap<block::Height, sprout::tree::Root>,
|
pub(crate) sprout_anchors_by_height: BTreeMap<block::Height, sprout::tree::Root>,
|
||||||
/// The Sprout note commitment tree for each anchor.
|
/// The Sprout note commitment tree for each anchor.
|
||||||
|
|
@ -68,11 +68,11 @@ pub struct Chain {
|
||||||
pub(crate) sprout_trees_by_anchor:
|
pub(crate) sprout_trees_by_anchor:
|
||||||
HashMap<sprout::tree::Root, sprout::tree::NoteCommitmentTree>,
|
HashMap<sprout::tree::Root, sprout::tree::NoteCommitmentTree>,
|
||||||
/// The Sapling anchors created by `blocks`.
|
/// The Sapling anchors created by `blocks`.
|
||||||
pub(crate) sapling_anchors: HashMultiSet<sapling::tree::Root>,
|
pub(crate) sapling_anchors: MultiSet<sapling::tree::Root>,
|
||||||
/// The Sapling anchors created by each block in `blocks`.
|
/// The Sapling anchors created by each block in `blocks`.
|
||||||
pub(crate) sapling_anchors_by_height: BTreeMap<block::Height, sapling::tree::Root>,
|
pub(crate) sapling_anchors_by_height: BTreeMap<block::Height, sapling::tree::Root>,
|
||||||
/// The Orchard anchors created by `blocks`.
|
/// The Orchard anchors created by `blocks`.
|
||||||
pub(crate) orchard_anchors: HashMultiSet<orchard::tree::Root>,
|
pub(crate) orchard_anchors: MultiSet<orchard::tree::Root>,
|
||||||
/// The Orchard anchors created by each block in `blocks`.
|
/// The Orchard anchors created by each block in `blocks`.
|
||||||
pub(crate) orchard_anchors_by_height: BTreeMap<block::Height, orchard::tree::Root>,
|
pub(crate) orchard_anchors_by_height: BTreeMap<block::Height, orchard::tree::Root>,
|
||||||
|
|
||||||
|
|
@ -119,12 +119,12 @@ impl Chain {
|
||||||
sapling_note_commitment_tree,
|
sapling_note_commitment_tree,
|
||||||
orchard_note_commitment_tree,
|
orchard_note_commitment_tree,
|
||||||
spent_utxos: Default::default(),
|
spent_utxos: Default::default(),
|
||||||
sprout_anchors: HashMultiSet::new(),
|
sprout_anchors: MultiSet::new(),
|
||||||
sprout_anchors_by_height: Default::default(),
|
sprout_anchors_by_height: Default::default(),
|
||||||
sprout_trees_by_anchor: Default::default(),
|
sprout_trees_by_anchor: Default::default(),
|
||||||
sapling_anchors: HashMultiSet::new(),
|
sapling_anchors: MultiSet::new(),
|
||||||
sapling_anchors_by_height: Default::default(),
|
sapling_anchors_by_height: Default::default(),
|
||||||
orchard_anchors: HashMultiSet::new(),
|
orchard_anchors: MultiSet::new(),
|
||||||
orchard_anchors_by_height: Default::default(),
|
orchard_anchors_by_height: Default::default(),
|
||||||
sprout_nullifiers: Default::default(),
|
sprout_nullifiers: Default::default(),
|
||||||
sapling_nullifiers: Default::default(),
|
sapling_nullifiers: Default::default(),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue