Skip to content

Commit

Permalink
restore empty function, call it unchanged
Browse files Browse the repository at this point in the history
  • Loading branch information
cheme committed Jan 24, 2024
1 parent fca9577 commit 26e462d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions trie-db/src/triedbmut.rs
Original file line number Diff line number Diff line change
Expand Up @@ -837,6 +837,14 @@ impl<H: Copy, DL: Default> Changeset<H, DL> {
Changeset::Existing(node) => node.hash,
}
}

pub fn unchanged(root: H) -> Self {
Changeset::Existing(ExistingChangesetNode {
hash: root,
prefix: (BackingByteVec::new(), None),
location: Default::default(),
})
}
}

pub type OwnedPrefix = (BackingByteVec, Option<u8>);
Expand Down

0 comments on commit 26e462d

Please sign in to comment.