Skip to content

Commit

Permalink
Merge pull request #10 from subspace/make-some-methods-in-overlay-public
Browse files Browse the repository at this point in the history
Make crate visible methods of `OverlayedChanges` public
  • Loading branch information
ParthDesai authored Dec 5, 2023
2 parents c63a8b2 + 1f8fc73 commit cae56b5
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ impl<H: Hasher> OverlayedChanges<H> {
/// `None` can be used to delete a value specified by the given key.
///
/// Can be rolled back or committed when called inside a transaction.
pub(crate) fn set_child_storage(
pub fn set_child_storage(
&mut self,
child_info: &ChildInfo,
key: StorageKey,
Expand All @@ -373,7 +373,7 @@ impl<H: Hasher> OverlayedChanges<H> {
/// Clear child storage of given storage key.
///
/// Can be rolled back or committed when called inside a transaction.
pub(crate) fn clear_child_storage(&mut self, child_info: &ChildInfo) -> u32 {
pub fn clear_child_storage(&mut self, child_info: &ChildInfo) -> u32 {
self.mark_dirty();

let extrinsic_index = self.extrinsic_index();
Expand All @@ -391,7 +391,7 @@ impl<H: Hasher> OverlayedChanges<H> {
/// Removes all key-value pairs which keys share the given prefix.
///
/// Can be rolled back or committed when called inside a transaction.
pub(crate) fn clear_prefix(&mut self, prefix: &[u8]) -> u32 {
pub fn clear_prefix(&mut self, prefix: &[u8]) -> u32 {
self.mark_dirty();

self.top.clear_where(|key, _| key.starts_with(prefix), self.extrinsic_index())
Expand All @@ -400,7 +400,7 @@ impl<H: Hasher> OverlayedChanges<H> {
/// Removes all key-value pairs which keys share the given prefix.
///
/// Can be rolled back or committed when called inside a transaction
pub(crate) fn clear_child_prefix(&mut self, child_info: &ChildInfo, prefix: &[u8]) -> u32 {
pub fn clear_child_prefix(&mut self, child_info: &ChildInfo, prefix: &[u8]) -> u32 {
self.mark_dirty();

let extrinsic_index = self.extrinsic_index();
Expand Down

0 comments on commit cae56b5

Please sign in to comment.