rename PrecomputedSubtrees -> PairComputations
This commit is contained in:
parent
1a2c4b7c85
commit
ff9c8242ee
1 changed files with 4 additions and 4 deletions
|
@ -352,8 +352,8 @@ pub(crate) trait SparseMerkleTree<const DEPTH: u8> {
|
|||
|
||||
fn sorted_pairs_to_leaves(
|
||||
pairs: Vec<(Self::Key, Self::Value)>,
|
||||
) -> PrecomputedSubtrees<u64, Self::Leaf> {
|
||||
let mut accumulator: PrecomputedSubtrees<u64, Self::Leaf> = Default::default();
|
||||
) -> PairComputations<u64, Self::Leaf> {
|
||||
let mut accumulator: PairComputations<u64, Self::Leaf> = Default::default();
|
||||
|
||||
// The kv-pairs we've seen so far that correspond to a single leaf.
|
||||
let mut current_leaf_buffer: Vec<(Self::Key, Self::Value)> = Default::default();
|
||||
|
@ -632,7 +632,7 @@ impl SubtreeLeaf {
|
|||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
pub struct PrecomputedSubtrees<K, L> {
|
||||
pub(crate) struct PairComputations<K, L> {
|
||||
/// Literal leaves to be added to the sparse Merkle tree's internal mapping.
|
||||
pub nodes: BTreeMap<K, L>,
|
||||
/// "Conceptual" leaves that will be used for computations.
|
||||
|
@ -670,7 +670,7 @@ impl<K, L> PrecomputedSubtrees<K, L> {
|
|||
}
|
||||
|
||||
// Derive requires `L` to impl Default, even though we don't actually need that.
|
||||
impl<K, L> Default for PrecomputedSubtrees<K, L> {
|
||||
impl<K, L> Default for PairComputations<K, L> {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
nodes: Default::default(),
|
||||
|
|
Loading…
Add table
Reference in a new issue